Description: 智能小车设计:
基本性能指标:
通过红外传感器或金属传感器检测运行轨迹;
0~3秒内完成小车加速,3~6秒匀速运行,7~9秒完成减速、停车功能;
选做部分:
实现小车跟踪功能;
实现小车避障功能。-Smart car design: the basic performance indicators: through the infrared sensors or metal detection sensors running track 0 ~ 3 seconds to complete the car accelerated, uniform 3 ~ 6 seconds to run, 7 ~ 9 seconds to complete deceleration, parking functions election to do parts: the realization of Vehicle tracking realize vehicle obstacle avoidance function. Platform: |
Size: 1024 |
Author:刘学良 |
Hits:
Description: 停车场管理首先,实现栈和队列的基本操作,在此基础上,实现停车场管理。
停车场管理问题描述:设停车场是一个可停放n辆车的狭长通道,且只有一个大门可供汽车进出。在停车场内,汽车按到达的先后次序,由北向南依次排列(假设大门在最南端)。若车场内已停满n辆车,则后来的汽车需在门外的便道上等候,当有车开走时,便道上的第一辆车即可开入。当停车场内某辆车要离开时,在它之后进入的车辆必须先退出车场为它让路,待该辆车开出大门后,其它车辆再按原次序返回车场。每辆车离开停车场时,应按其停留时间的长短交费(在便道上停留的时间不收费)。
试编写程序,模拟上述管理过程。要求以顺序栈模拟停车场,以链队列模拟便道。
从终端读入汽车到达或离去的数据,每组数据包括三项:
① 是“到达”还是“离去”;
② 汽车牌照号码;
③ “到达”或“离去”的时刻。
与每组输入信息相应的输出信息为:
如果是到达的车辆,则输出其在停车场中或便道上的位置;
如果是离去的车辆,则输出其在停车场中停留的时间和应交的费用。
(提示:需另设一个栈,临时停放为让路而从车场退出的车。)
-First of all, car park management, the realization of the basic stack and queue operations, on this basis, the achievement of the car park management.
Description of the car park management: for the parking of the car park is a strip of n-channel vehicles, and there is only one door open to motor out. In the parking lot, the vehicle according to the order of arrival, from north to south in order of priority (assuming the door at the southern tip). If the vehicle has been parked inside vehicles over n, then later in the car to be waiting outside the pavement, when a car driven away, the sidewalk on the first car to be opened. When parking vehicles within a certain time to leave, after it entered the vehicle must first withdraw from the yard to make way for it to be out of the car door, the other vehicles and then order the return of the original car. When the vehicle left the parking lot, should be the length of their stay paid (in the pavement at the time to stay free of charge).
T Platform: |
Size: 1024 |
Author:小也 |
Hits: