摘要: Longest Ordered SubsequenceDescriptionA numeric sequence ofaiis ordered ifa1<a2< ... <aN. Let the subsequence of the given numeric sequence (a1,a2, ...,aN) be any sequence (ai1,ai2, ...,aiK), where 1 <=i1<i2< ... <iK<=N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered 阅读全文
posted @ 2013-04-09 23:27 _log__ 阅读(145) 评论(0) 推荐(0) 编辑
摘要: A Simple Problem with IntegersDescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the sum of numbers in a given interval.InputThe first line con. 阅读全文
posted @ 2013-04-09 21:47 _log__ 阅读(159) 评论(0) 推荐(0) 编辑