摘要: B -Wooden SticksTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%lld & %lluSubmitStatusDescriptionThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, 阅读全文
posted @ 2013-07-31 11:39 围剿大叔 阅读(242) 评论(0) 推荐(0) 编辑
摘要: The 3n + 1 problemTime Limit:3000MSMemory Limit:Unknown64bit IO Format:%lld & %llu[Submit] [Go Back] [Status]DescriptionThe 3n+ 1 problemBackgroundProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you 阅读全文
posted @ 2013-07-31 10:39 围剿大叔 阅读(138) 评论(0) 推荐(0) 编辑
摘要: A -Monkey and BananaTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%lld & %lluSubmitStatusDescriptionA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. 阅读全文
posted @ 2013-07-30 15:38 围剿大叔 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 最长递增子序列,Longest Increasing Subsequence 下面我们简记为 LIS。排序+LCS算法 以及 DP算法就忽略了,这两个太容易理解了。假设存在一个序列d[1..9] = 2 1 5 3 6 4 8 9 7,可以看出来它的LIS长度为5。下面一步一步试着找出它。我们定义一个序列B,然后令 i = 1 to 9 逐个考察这个序列。此外,我们用一个变量Len来记录现在最长算到多少了首先,把d[1]有序地放到B里,令B[1] = 2,就是说当只有1一个数字2的时候,长度为1的LIS的最小末尾是2。这时Len=1然后,把d[2]有序地放到B里,令B[1] = 1,就是说长度 阅读全文
posted @ 2013-07-30 10:00 围剿大叔 阅读(304) 评论(0) 推荐(0) 编辑
摘要: Mark一下 阅读全文
posted @ 2013-07-30 09:49 围剿大叔 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 动态规划:从新手到专家March 26, 2013作者:Hawstein出处:http://hawstein.com/posts/dp-novice-to-advanced.html声明:本文采用以下协议进行授权:自由转载-非商用-非衍生-保持署名|Creative Commons BY-NC-ND 3.0,转载请注明作者及出处。前言本文翻译自TopCoder上的一篇文章:Dynamic Programming: From novice to advanced,并非严格逐字逐句翻译,其中加入了自己的一些理解。水平有限,还望指摘。前言_我们遇到的问题中,有很大一部分可以用动态规划(简称DP)来解 阅读全文
posted @ 2013-07-30 09:00 围剿大叔 阅读(206) 评论(0) 推荐(0) 编辑
摘要: C -PurificationTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 329ADescriptionYou are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming ann 阅读全文
posted @ 2013-07-27 17:01 围剿大叔 阅读(200) 评论(0) 推荐(0) 编辑
摘要: B -Funky NumbersTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 192ADescriptionAs you very well know, this year's funkiest numbers are so called triangular numbers (that is, integers that are representable as, wherekis some positive integer), 阅读全文
posted @ 2013-07-27 14:42 围剿大叔 阅读(261) 评论(0) 推荐(0) 编辑
摘要: E -Queue at the SchoolTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 266BDescriptionDuring the break the schoolchildren, boys and girls, formed a queue ofnpeople in the canteen. Initially the children stood in the order they entered the canteen. 阅读全文
posted @ 2013-07-27 13:08 围剿大叔 阅读(250) 评论(0) 推荐(0) 编辑
摘要: A -Bus GameTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uDescriptionAfter Fox Ciel won an onsite round of a programming contest, she took a bus to return to her castle. The fee of the bus was 220 yen. She met Rabbit Hanako in the bus. They decided to play the following game 阅读全文
posted @ 2013-07-27 13:03 围剿大叔 阅读(273) 评论(0) 推荐(0) 编辑