文件名称:railk
介绍说明--下载内容均来自于网络,请自行研究使用
最优车皮排序问题
.问题描述:
在一个列车调度站中,k 条轨道连接到k 条侧轨处,形成k 个铁路转轨栈,从左到右依
次记为H1,H2,…,Hk 如下图所示。其中左边轨道为车皮入口(记为H0),右边轨道为出
口(记为Hk+1),编号为a1, a2,.,an 的n 个车皮从入口依次进入转轨栈,由调度室安排车
皮进出栈次序,并对车皮按其出栈次序重新排序为1,2,…,n。
调度室在安排车皮进出栈次序时,遵循以下规则:
(1)
车皮入口H0 处的车皮可以进入转轨栈H1,H2,…,Hk 之一,或直接进入车
皮出口Hk+1 。
(2)
转轨栈H1,H2,…,Hk 处的车皮可以进入车皮出口Hk+1 。
.编程任务:
给定正整数n,和n 个车皮的初始编号a1, a2,.,an ,编程计算最少需要多少个转轨栈
才能按照规则(1)和(2)调度车皮,使车皮在车皮出口按照1,2,…,n 的顺序输出。
.数据输入:
由文件input.txt 给出输入数据。第1 行有1 个正整数n,表示有n 个车皮。第2 行是n
个车皮的初始编号a1, a2,.,an 。-wagon optimal scheduling problem. Problem descr iption : In a train station, k, k track connected to the side of the tracks, forming k stack rail transition from left to right followed credited to H1, H2, ..., Hk as in the figure below. Which left orbit for imported cars (credited to H0), the right track for exports (credited as a Hk), the No. a1, a2,. , An n-wagon from the entrance into the transition stack followed by the dispatch room arrangements wagon Stack access priorities, as well as cars stack up according to the order reordering of 1,2, ..., n. The dispatch room in arranging access stack wagon order, to abide by the following rules : (1) H0 wagon entrance of cars can enter the transition stack H1, H2, ..., Hk, or directly into a wagon export Hk. (2) Transition stack H1, H2, ..., H
.问题描述:
在一个列车调度站中,k 条轨道连接到k 条侧轨处,形成k 个铁路转轨栈,从左到右依
次记为H1,H2,…,Hk 如下图所示。其中左边轨道为车皮入口(记为H0),右边轨道为出
口(记为Hk+1),编号为a1, a2,.,an 的n 个车皮从入口依次进入转轨栈,由调度室安排车
皮进出栈次序,并对车皮按其出栈次序重新排序为1,2,…,n。
调度室在安排车皮进出栈次序时,遵循以下规则:
(1)
车皮入口H0 处的车皮可以进入转轨栈H1,H2,…,Hk 之一,或直接进入车
皮出口Hk+1 。
(2)
转轨栈H1,H2,…,Hk 处的车皮可以进入车皮出口Hk+1 。
.编程任务:
给定正整数n,和n 个车皮的初始编号a1, a2,.,an ,编程计算最少需要多少个转轨栈
才能按照规则(1)和(2)调度车皮,使车皮在车皮出口按照1,2,…,n 的顺序输出。
.数据输入:
由文件input.txt 给出输入数据。第1 行有1 个正整数n,表示有n 个车皮。第2 行是n
个车皮的初始编号a1, a2,.,an 。-wagon optimal scheduling problem. Problem descr iption : In a train station, k, k track connected to the side of the tracks, forming k stack rail transition from left to right followed credited to H1, H2, ..., Hk as in the figure below. Which left orbit for imported cars (credited to H0), the right track for exports (credited as a Hk), the No. a1, a2,. , An n-wagon from the entrance into the transition stack followed by the dispatch room arrangements wagon Stack access priorities, as well as cars stack up according to the order reordering of 1,2, ..., n. The dispatch room in arranging access stack wagon order, to abide by the following rules : (1) H0 wagon entrance of cars can enter the transition stack H1, H2, ..., Hk, or directly into a wagon export Hk. (2) Transition stack H1, H2, ..., H
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 117143165railk.rar 列表 railk\railk.cpp railk\railk.pdf railk\railk.txt railk