摘要:
You are given two sequences of integer numbers. Write a program to determine their common increasing subsequence of maximal possible length. Sequence 阅读全文
摘要:
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 阅读全文
摘要:
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 [ 阅读全文
摘要:
Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 阅读全文
摘要:
搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会很累,因为2*k也不小是一个不大于n的整数.幸 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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, 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文