摘要: Digit SequenceTime Limit: 1000 MSMemory Limit: 65535 KDescriptionDawn is playing a game with some children. He gives them several arithmetic expressions and then asks them whether these expressions' value can form a digit sequence. The value of an expression is just the result we calculate them. 阅读全文
posted @ 2012-08-18 11:25 _sunshine 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 子序列的和Time Limit: 1000 MSMemory Limit: 32768 KDescription输入一个长度为n的整数序列(A1,A2,……,An),从中找出一段连续的长度不超过m的子序列,使得这个子序列的和最大。Input有多组测试数据,不超过20组测试数据。对于每组测试的第一行,包含两个整数n和m(n,m<=10^5),表示有n个数,子序列长度限制为m,表示这个序列的长度,第二行为n个数,每个数的范围为[-1000, 1000]。Output对于每组测试数据,输出最大的子序列和,并换行。Sample Input3 11 2 33 2-1000 1000 1Sample 阅读全文
posted @ 2012-08-18 11:19 _sunshine 阅读(454) 评论(0) 推荐(0) 编辑