文件名称:elevator
- 所属分类:
- 数学计算/工程计算
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- littl*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
大楼有一部电梯,电梯从一楼起,几乎每层都停,十分浪费时间。于是某人想出了一个新的电梯调度算法:由于大楼楼层不高,因此每次电梯从一楼往上走时,只允许电梯停在某一层,然后其他人在从本层爬楼梯到达各自的目的地;在一楼的时候,每人选择自己的楼层,电梯应根据每楼层的不同人数计算出目的楼层。请求出电梯停在哪一层,才能保证所有旅客所爬楼层数之和最少-The building has an elevator, early in the evening peak period when the elevator from the first floor from almost each layer to stop a huge waste of time. So someone came up with a new elevator scheduling algorithm: building floor is not high, so every time the elevator going up from the first floor, only to allow the elevator stopped at a floor, and then others from the layer of climbing stairs to reach their respective the destination when the first floor, each choose their own floor, the elevator should be calculated according to the different number for each floor, destination floor. Request to stop the elevator which floor, in order to ensure that all passengers are climbing stairs layers and at least (downstairs+ upstairs).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Project1.c
p1_out.txt
p1_in.txt
p1_out.txt
p1_in.txt