文件名称: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:
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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.