
深搜
文章平均质量分 67
Rechard_chen
不积跬步无以至千里。
展开
-
字符序列
Problem Description 从三个元素的集合[A,B,C]中选取元素生成一个N个字符组成的序列,使得没有两个相邻字的子序列(子序列长度=2)相同。例:N=5时ABCBA是合格的,而序列ABCBC与ABABC是不合格的,因为其中子序列BC,AB是相同的。 对于由键盘输入的N(1 Input 输入有多组数据,每组数据只有一行为一个整数N。 Output 对于原创 2014-10-22 19:27:48 · 1113 阅读 · 0 评论 -
Ordering Tasks
Description John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been executed. Input The input wi原创 2014-12-17 19:25:42 · 729 阅读 · 0 评论 -
Fun House
Description American Carnival Makers Inc. (ACM) has a long history of designing rides and attractions. One of their more popular attractions is a fun house that includes a room of mirrors. Their原创 2015-07-28 16:40:03 · 708 阅读 · 0 评论 -
滑雪
Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14原创 2015-08-03 20:29:43 · 530 阅读 · 0 评论