登录
首页 » C# » laquo; Problem description : In a train station, k, k track connected to the sid...

laquo; Problem description : In a train station, k, k track connected to the sid...

于 2023-04-18 发布 文件大小:976.00 B
0 85
下载积分: 2 下载次数: 1

代码说明:

« 问题描述:在一个列车调度站中,k条轨道连接到k条侧轨处,形成k个铁路转轨栈,从左到右依次记为H1,H2,…,Hk如下图所示。其中左边轨道为车皮入口(记为H0),右边轨道为出口(记为Hk+1),,编号为a , a , ,an 1 2  的n 个车皮从入口依次进入转轨栈,由调度室安排车皮进出栈次序,并对车皮按其出栈次序重新排序为1,2,…,n。调度室在安排车皮进出栈次序时,遵循以下规则:(1) 车皮入口H0处的车皮可以进入转轨栈H1,H2,…,Hk之一,或直接进入车皮出口Hk+1。(2) 转轨栈H1,H2,…,Hk处的车皮可以进入车皮出口Hk+« 编程任务:给定正整数n,和n个车皮的初始编号n a , a , ,a 1 2  ,编程计算最少需要多少个转轨栈才能按照规则(1)和(2)调度车皮,使车皮在车皮出口按照1,2,…,n的顺序输出。« 数据输入:由文件input.txt 给出输入数据。第1 行有1 个正整数n,表示有n 个车皮。第2 行是n个车皮的初始编号n a , a , ,a 1 2  。« 结果输出:将计算出的最少转轨栈数输出到文件output.txt。输入文件示例 输出文件示例input.txt output.txt42 3 4 13-laquo; Problem description : 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), and numbered a, a, and an 1 2# 61516; The n followed by wagon from the entrance into the stack transition from

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • cxxtest-4.3.tar
    cxxtest-4.3.tar.gz is a very good unit test software
    2015-05-25 22:17:44下载
    积分:1
  • NS2
    和公司;&;&;&;;;;;;;;;;;;;;;;;;;;;;
    2023-01-30 18:15:03下载
    积分:1
  • NPOI控件源码与实例
    NPOI控件源码与实例
    2016-06-13下载
    积分:1
  • src
    遍历浏览器的每个页面,每个框架标签的内容。(As Chinese Description)
    2011-09-02 11:36:52下载
    积分:1
  • MATLABcode
    matlab中对图形轮廓的特征提取代码,程序实现,(matlab in the graphic outline feature extraction code, program implementation,)
    2013-09-03 19:40:06下载
    积分:1
  • usbcam729
    嵌入式linux 下使用 v4l2采集USB摄像头图像的完整代码,输出文件可播放(Using v4l2 to collect the complete code of USB camera image under embedded linux, the output file can be played.)
    2020-06-19 23:40:02下载
    积分:1
  • bcb 网口串口通信
    针对公司写的与通信设备对接的网口和串口通信,界面简洁,网口通信使用的bcb自带控件,串口通信使用xcom控件,适合新手学习
    2022-03-01 11:16:01下载
    积分:1
  • CNC-MILL
    用C51开发的数控铣床控制器程序,包含直线插补,圆弧插补(CNC milling machine with C51 controller development process, including linear interpolation, circular interpolation)
    2021-03-01 10:19:35下载
    积分:1
  • NiBianQi
    模型预测电流控制其控制思想基于以下原理:首先,功率变换器产生的开关状态个数有限,且通过建立模型可以预测每一个开关状态下被控变量的对应变化特性;其次,定义价值函数评价被控变量的预测值,为判别最优有限开关状态提供依据;最后,计算出每一种开关状态下的价值函数值,以此评价每一种开关状态下被控变量预测值的优劣,选择出最优的开关状态并应用。(The control idea of model predictive current control is based on the following principles: firstly, the number of switching states produced by power converter is limited, and the strain characteristics of controlled variables under each switching state can be predicted by establishing a model; secondly, the value function is defined to evaluate the predicted values of controlled variables, which provides a basis for judging the optimal finite switching state; lastly, the optimal finite switching state is calculated. The value function value under switching state is used to evaluate the predicted value of controlled variables under each switching state, and the optimal switching state is selected and applied.)
    2019-01-30 10:28:38下载
    积分:1
  • waveletbp
    自己做的小波与神经网络组合方法实现负荷预测程序,与大家交流(Themselves to do the wavelet and neural network combination method to achieve load forecasting procedures, with the U.S. exchange)
    2021-04-27 09:48:44下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载