所属分类:
其他
开发工具:C/C++
文件大小:383KB
下载次数:0
上传日期:2019-01-08 20:01:10
说明: 设停车场是一个可停放n辆车的狭长通道,且只有一个大门可供汽车进出。在停车场内,汽车按到达的先后次序,由北向南依次排列(假设大门在最南端)。若停车场内已停满n辆车,则后来的汽车需在门外的便道上等候,当有车开走时,便道上的第一辆车即可开入。当停车场内某辆车要离开时,在它之后进入的车辆必须先退出停车场为它让路,待该辆车开出大门后,其他车辆再按原次序返回车场。每辆车离开停车场时,应按其停留时间的长短交费(在便道上停留的时间不收费)。?
(The parking lot is a narrow passageway for parking n cars, and there is only one gate for cars to enter and exit. In the parking lot, cars are arranged in order of arrival from north to South (assuming the gate is at the southern end). If the parking lot is full of n cars, then the subsequent cars will have to wait on the sidewalk outside the door. When a car leaves, the first car on the sidewalk can enter. When a car in the parking lot wants to leave, the vehicle entering after it must first exit the parking lot to make way for it. After the car leaves the gate, the other vehicles return to the parking lot in the original order. When each car leaves the parking lot, it should pay according to the length of its stay (no charge for the time spent on the sidewalk).)
文件列表:
新建文件夹\停车场问题.cpp, 2091 , 2018-05-17
新建文件夹\停车场问题.exe, 2011638 , 2018-05-17
新建文件夹, 0 , 2019-01-08