摘要: "OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There wil 阅读全文
posted @ 2018-04-16 21:55 litos 阅读(135) 评论(0) 推荐(0) 编辑
摘要: It is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, 阅读全文
posted @ 2018-04-16 20:40 litos 阅读(168) 评论(0) 推荐(0) 编辑
摘要: You are given two sequences of integer numbers. Write a program to determine their common increasing subsequence of maximal possible length. Sequence 阅读全文
posted @ 2018-04-16 20:36 litos 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the 阅读全文
posted @ 2018-04-16 20:13 litos 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Let us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequence. 2. If S is a regular sequence, then (S) and [ 阅读全文
posted @ 2018-04-16 19:55 litos 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 阅读全文
posted @ 2018-04-16 19:35 litos 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会很累,因为2*k也不小是一个不大于n的整数.幸 阅读全文
posted @ 2018-04-16 19:32 litos 阅读(99) 评论(0) 推荐(0) 编辑
摘要: A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24 阅读全文
posted @ 2018-04-16 13:01 litos 阅读(129) 评论(0) 推荐(0) 编辑
摘要: A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program 阅读全文
posted @ 2018-04-16 12:51 litos 阅读(164) 评论(0) 推荐(0) 编辑
摘要: A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence ( a1, a2, ..., aN) be any sequence ( ai1, 阅读全文
posted @ 2018-04-16 12:40 litos 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 73 88 1 02 7 4 44 5 2 6 5(Figure 1) Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route tha 阅读全文
posted @ 2018-04-16 12:25 litos 阅读(114) 评论(0) 推荐(0) 编辑
摘要: DreamGrid has a magical knapsack with a size capacity of called the Schrödinger's knapsack (or S-knapsack for short) and two types of magical items ca 阅读全文
posted @ 2018-04-16 12:13 litos 阅读(275) 评论(0) 推荐(0) 编辑