C

所属分类:图形图象
开发工具:C++
文件大小:119KB
下载次数:1
上传日期:2014-01-05 13:19:15
上 传 者lonelyxin
说明:  判断人字形轨道上按照顺序进入轨道的车辆是否可以按照某种给定的顺序依次驶出。
(There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to establish only a surface track. Moreover, it turned out that the station could be only a dead-end one and due to lack of available space it could have only one track. The local tradition is that every train arriving from the direction A continues in the direction B with coaches reorganized in some way. Assume that the train arriving from the direction A has N ≤ 1000 coaches numbered in increasing order 1, 2, ..., N. The chief for train reorganizations must know whether it is possible to marshal coaches continuing in the direction B so that their order will be a1, a2, ..., aN. Help him and write a program that decides whether it is possible to get the required order of coaches. You can assume that single coaches can be disconnected from the train before they enter the station and that they )

文件列表:
C'.cpp (951, 2012-12-15)
C'.exe (577803, 2012-12-15)

近期下载者

相关文件


收藏者