文件名称:trains
介绍说明--下载内容均来自于网络,请自行研究使用
一列货运列车共有n节车厢,每节车厢将停放在不同的车站。假定n个车站的编号分别为1~n,车厢的编号与它们的目的地相同。货运列车按照从第n站至第1站的次序经过这些车站。为了便于从列车上卸掉相应的车厢,必须重新排列车厢,使各车厢从前至后按编号1~n的次序排列。当所有的车厢按照这种次序排列时,在每个车站只需卸掉最后一节车厢即可。可以在一个转轨站里完成车厢的重排工作,在转轨站中有一个入轨,一个出轨和k个缓冲铁轨(位于入轨和出轨之间)。-A total of n freight train cars, each car will be parked at different stations. N the assumption that the number of stations, respectively, for 1 ~ n, the number of compartments with them the same destination. Freight train n from the first station in accordance with paragraph 1, points to the order of a result of these stations. In order to facilitate the train removed from the compartment, must be re-arranged inside, so that after the train to the previous number by 1 ~ n of the order. When all the compartments in accordance with this order, in each station dismantled only one train can be the last. Transition points in a complete rearrangement of the work inside, in the station, there is a transition orbit, a derailment and the k-buffer tracks (located between the orbit and the derailment).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
trains
......\linkstack.h
......\main.cpp
......\trains.cpp
......\linkstack.h
......\main.cpp
......\trains.cpp