文件名称:park
介绍说明--下载内容均来自于网络,请自行研究使用
停车场管理。设停车场内只有一个可停放n辆汽车的狭长通道,且只有一个大门可供汽车进出。汽车在停车场内按车辆到达时间的先后顺序,依次由北向南排列(大门在最南端,最先到达的第一辆车停放在车场的最北端),若车场内已停满n辆汽车,则后来的汽车只能在门外的便道上等候,一旦有车开走,则排在便道上的第一辆车即可开入。当停车场内某辆车要离开时,在它之后开入的车辆必须先退出车场为它让路,待该辆车开出大门外,其它车辆再按原次序进入车场。每辆停放在车场的车在它不离开停车场时必须按它停留的时间长短交费。试为停车场编制按上述要求进行管理的模拟程序。-Parking. Parking lots within the park is only a narrow channel n cars, and only one gate for car access. Car in a car park by vehicles, time of arrival of the order in ordered north to south (entrance at the southern tip of the first arrival of the first car parked in the yard of the most northern end), if the car had been parked inside n cars, then later The car only on the sidewalk outside waiting, when a car drove off, then came in the first car on the pavement can be opened into. When the car park a car to leave, after it opened into the vehicle must first leave the yard to make way for it, to be out of the car outside the gate, other vehicles and then into the yard of the original order. Every car parked in yards in that it does not leave the car park must stay the length of time by its Contributions. Test preparation for the parking requirements according to the management of simulation programs.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
park.c