文件名称:banksulotion
- 所属分类:
- 进程与线程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2013-11-23
- 文件大小:
- 4.66mb
- 下载次数:
- 0次
- 提 供 者:
- 赵**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
银行柜员服务问题:银行有n个柜员负责为顾客服务,顾客进入银行先取一个号码,然后等着叫号。当某个柜员空闲下来,就叫下一个号。
编程实现该问题,用P、V操作实现柜员和顾客的同步。
实现要求
某个号码只能由一名顾客取得;
不能有多于一个柜员叫同一个号;
有顾客的时候,柜员才叫号;
无柜员空闲的时候,顾客需要等待;
无顾客的时候,柜员需要等待。
测试文本格式
测试文件由若干记录组成,记录的字段用空格分开。记录第一个字段是顾客序号,第二字段为顾客进入银行的时间,第三字段是顾客需要服务的时间。
输出要求
对于每个顾客需输出进入银行的时间、开始服务的时间、离开银行的时间和服务柜员号。-Bank teller service issues: bank teller is responsible for the n-th customer service, the customer enters the bank to take a number and wait for call number. When a teller idle down, and called the next number. Programming the issue, P, V synchronization teller operations and customers. Implementation requires a number can only be achieved by a customer can not have more than one teller called the same number has a customer when the teller called number without teller idle time, the customer need to wait without the customer' s time, the teller need to wait. Test text test file composed by a number of records, record fields separated by a space. Record first field is the customer number, the second field is the time a customer enters the bank, and the third field is the time the customer needs the service. Output requirements for each customer need output into the bank' s time to begin serving time, leaving the bank teller time and service number.
编程实现该问题,用P、V操作实现柜员和顾客的同步。
实现要求
某个号码只能由一名顾客取得;
不能有多于一个柜员叫同一个号;
有顾客的时候,柜员才叫号;
无柜员空闲的时候,顾客需要等待;
无顾客的时候,柜员需要等待。
测试文本格式
测试文件由若干记录组成,记录的字段用空格分开。记录第一个字段是顾客序号,第二字段为顾客进入银行的时间,第三字段是顾客需要服务的时间。
输出要求
对于每个顾客需输出进入银行的时间、开始服务的时间、离开银行的时间和服务柜员号。-Bank teller service issues: bank teller is responsible for the n-th customer service, the customer enters the bank to take a number and wait for call number. When a teller idle down, and called the next number. Programming the issue, P, V synchronization teller operations and customers. Implementation requires a number can only be achieved by a customer can not have more than one teller called the same number has a customer when the teller called number without teller idle time, the customer need to wait without the customer' s time, the teller need to wait. Test text test file composed by a number of records, record fields separated by a space. Record first field is the customer number, the second field is the time a customer enters the bank, and the third field is the time the customer needs the service. Output requirements for each customer need output into the bank' s time to begin serving time, leaving the bank teller time and service number.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
banksulotion
............\banksulotion
............\banksulotion.ncb
............\banksulotion.sln
............\banksulotion.suo
............\............\bank.cpp
............\............\banksulotion.vcproj
............\............\banksulotion.vcproj.zhao-HP.zhao.user
............\............\Debug
............\............\.....\bank.obj
............\............\.....\banksulotion.exe.embed.manifest
............\............\.....\banksulotion.exe.embed.manifest.res
............\............\.....\banksulotion.exe.intermediate.manifest
............\............\.....\BuildLog.htm
............\............\.....\mt.dep
............\............\.....\vc90.idb
............\............\.....\vc90.pdb
............\............\input.txt
............\............\output.txt
............\Debug
............\.....\banksulotion.exe
............\.....\banksulotion.ilk
............\.....\banksulotion.pdb