文件名称:parking
介绍说明--下载内容来自于网络,使用问题请自行百度
设停车场是一个可停放n辆车的狭长通道,且只有一个大门可供汽车进出。在停车场内,汽车按到达的先后次序,由北向南依次排列(假设大门在最南端)。若停车场内已停满n辆车,则后来的汽车需在门外的便道上等候,当有车开走时,便道上的第一辆车即可开入。当停车场内某辆车要离开时,在它之后进入的车辆必须先退出停车场为它让路,待该辆车开出大门后,其他车辆再按原次序返回车场。每辆车离开停车场时,应按其停留时间的长短交费(在便道上停留的时间不收费)。-Parking lots is an n vehicles parked narrow channel, and only one gate for vehicle access. In the parking lot, the cars arriving in the order, from north to south in order of priority (assuming the door at the southernmost tip). If the car parks have been full of parked cars n, then the car was required to wait outside on the sidewalk when a car pulled away, the first car on the pavement can be opened into. When the car park of a cars to leave, after it entered vehicles must exit to make way for its parking lot, waiting for the cars out the door, the other vehicle and then return to the original order of yards. When the vehicle left the parking lot shall be the length of their stay Contributions (in the pavement time is not spent on fees).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
parking.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.