CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 Windows编程 其他小程序

文件名称:The-annoyance-of-the-productor

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2013-01-19
  • 文件大小:
    574byte
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

列车长的烦恼

Acceteped : 1705 Submit : 3924

Time Limit : 1000 MS Memory Limit : 65536 KB



Descr iption

John是个小列车站的站长,每次列车在这里重新编组时他就很烦恼。因为站上只有一个人字形的编组轨道(如图),所有的列车车厢都是从人字轨的右边依次进去,从左边出来。但有一些编组顺序John总编不出来,John怀疑有些编组顺序是不可能完成的,可John又找不出那些是顺序是可以编组出,那些不可以。请你写一个程序帮助John辨别哪些编组可以完成,哪些不能完成。





输入:



第一行是一个整数K,表示有多少个测试用例,以后每行一个测试用例,每行为n+1个整数,第一个整数为n 表示有多少节车厢,后面n个整数表示需要编组成的顺序。比如说3节车厢,按照1,2,3依次入轨编组,可以在左边形成1 2 3,1 3 2,2 1 3,2 3 1,321。









输出:



每行输出一个测试用例的结果。如果可以编组输出Yes,否则输出No。





Sample Input

2

3 3 1 2

4 1 2 3 4



Sample Output

No

Yes

-Conductor troubles

Acceteped: 1705 Submit: 3924

Time Limit: 1000 MS Memory Limit: 65536 KB

 

Descr iption

John is the webmaster of a small train station, he is very trouble each train regrouping. Turn inside out from the left because the right side of the station is only a grouping of chevron track (pictured), all train compartments are herringbone track. Marshalling the order of John editor-in-chief but not out, John suspected some grouping order is impossible, John could not find those order can marshalling those who can not. You write a program to help John to identify which grouping can be done, what can not be completed.





Input:



The first line is an integer K, the number of test cases, each subsequent line of a test case, every behavior n integer, an integer n represents the number of cars behind n integers need grouped order. For example, three cars, in accordance with 1, 2, 3, in turn orbit grouping, formed in the left 12 3,1 3 2,2 3,2 3 1,321.









Output:




(系统自动生成,下载前可以参看下载内容)

下载文件列表

The annoyance of the productor.txt

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com