文件名称:shujujiegou-dingchechangguanli
介绍说明--下载内容均来自于网络,请自行研究使用
设停车场是一个可以停放n辆汽车的狭长通道,且 只有一个大门可以供车辆进出。车辆按到达停车场时间的早、晚依次从停车场最里向大门口处停放(最先到达的第一辆车放在停车场的最里面)。
如果停车场已放满n辆车,那么,后面进入停车场的车只能在停车场大门外的便道上等待,一旦停车场内有车开走,则排在便道上的第一辆车就进入停车场。
停车场内如有某辆车要开走,在它之后进入停车场的车都必须先退出停车场为它让路,待其开出停车场后,这些车辆再依原来的次序进场。每辆车在离开停车场时,都应根据它在停车场内停留的时间长短交费。
如果停留在便道上的车未进停车场就要离去,允许其离去,不收停车费,并且在便道上等待的车辆依然保持原有次序不变。
设计一个程序,模拟此停车场管理。
-Parking lots can be accommodated is a narrow channel n cars, and
Only one door can be used for vehicle access. Car
Vehicles reach the parking lot at the time of the early and late to turn from the parking lot where most
Parked at the gate (the first arrival of the first car on the parking lot
The innermost).
If car parking has been filled with n, then back into the car park
Only large cars in the parking lot waiting on the sidewalk outside, once the parking lot
There are drive away, then came in on the first car on the sidewalk into the parking
Field.
Parking lot where a car to drive away, into the parking lot after it
Must first exit the car parking to make way for it, wait until out of parking
Field, these vehicles and then by order of the original approach. Vehicle away from the
Open parking lot, it should be based on time spent in the car park long
Short pay.
If you stay in the car on the sidewalk into the parking lot would not leave, to allow
The lef
如果停车场已放满n辆车,那么,后面进入停车场的车只能在停车场大门外的便道上等待,一旦停车场内有车开走,则排在便道上的第一辆车就进入停车场。
停车场内如有某辆车要开走,在它之后进入停车场的车都必须先退出停车场为它让路,待其开出停车场后,这些车辆再依原来的次序进场。每辆车在离开停车场时,都应根据它在停车场内停留的时间长短交费。
如果停留在便道上的车未进停车场就要离去,允许其离去,不收停车费,并且在便道上等待的车辆依然保持原有次序不变。
设计一个程序,模拟此停车场管理。
-Parking lots can be accommodated is a narrow channel n cars, and
Only one door can be used for vehicle access. Car
Vehicles reach the parking lot at the time of the early and late to turn from the parking lot where most
Parked at the gate (the first arrival of the first car on the parking lot
The innermost).
If car parking has been filled with n, then back into the car park
Only large cars in the parking lot waiting on the sidewalk outside, once the parking lot
There are drive away, then came in on the first car on the sidewalk into the parking
Field.
Parking lot where a car to drive away, into the parking lot after it
Must first exit the car parking to make way for it, wait until out of parking
Field, these vehicles and then by order of the original approach. Vehicle away from the
Open parking lot, it should be based on time spent in the car park long
Short pay.
If you stay in the car on the sidewalk into the parking lot would not leave, to allow
The lef
(系统自动生成,下载前可以参看下载内容)
下载文件列表
数据结构课程设计——停车场管理.doc