队列2

所属分类:数据结构
开发工具:C/C++
文件大小:1KB
下载次数:2
上传日期:2019-06-22 11:19:16
上 传 者111wxq
说明:  某汽车轮渡口,过江渡船每次能载 10 辆车过江。过江车辆分别为客车类和 货车类,上船有如下规定:同类车先到先上船,客车先于货车上渡船,且每上 4 辆客 车,才允许上一辆货车;若等待客车不足 4 辆则以货车代替;若无货车等待则允许客 车都上船。设计一个算法模拟渡口管理。
(An automobile ferry can carry 10 vehicles across the river at a time. The vehicles crossing the river are passenger cars and passenger cars respectively. For trucks, there are the following regulations for boarding: the same kind of vehicles first come first board the ship, the passenger cars first take the ferry on the truck, and each passenger gets on four passengers. Only one truck is allowed; if less than four waiting buses are replaced by a truck; if no waiting truck is allowed, passengers are allowed. All the cars get on board. Design an algorithm to simulate ferry management.)

文件列表:
队列2.cpp (2243, 2019-05-16)

近期下载者

相关文件


收藏者