摘要: Problem Description There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connec... 阅读全文
posted @ 2016-07-06 23:42 Pic 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 题目 Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest p... 阅读全文
posted @ 2016-07-06 23:42 Pic 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 关于动态规划的粗浅认识 在这篇博客里我写一下做了一个月的dp之后对dp的粗浅认识,并附上一些学习资源。 最优子结构 如果一个问题的最优解包含其子问题的最优解,我们就称此问题具有最优子结构。 –摘自《算法导论》 也就是说,具有最优子结构的问题的最优解一定是由其各个子问题的最优解组合而成的。 我觉得dp 阅读全文
posted @ 2016-05-31 22:15 Pic 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 题目 A 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. If the ... 阅读全文
posted @ 2016-05-30 23:48 Pic 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 这一道题是看题解过的,实在是太难了。。好难找的规律。。好坑的思路。在我的这个博客里引用http://m.blog.csdn.net/article/details?id=50638393 中的题解思路,这个题解还使用了矩阵快速幂的方法,具体见这个blog 题目 Problem Description 阅读全文
posted @ 2016-05-29 00:25 Pic 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 题目 Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave …The bone collect... 阅读全文
posted @ 2016-05-26 23:53 Pic 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 背包问题是dp中的很重要的一类问题,1016之后连续出现了多个背包问题,前面也有一些背包的问题。在这里转载崔添翼的背包九讲,我觉得通俗易懂,写的特别好 转载自http://love oriented.com/pack/pack2alpha1.pdf 阅读全文
posted @ 2016-05-26 00:49 Pic 阅读(586) 评论(0) 推荐(0) 编辑
摘要: 题目 Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.The game ca... 阅读全文
posted @ 2016-05-26 00:28 Pic 阅读(144) 评论(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, 阅读全文
posted @ 2016-05-23 22:16 Pic 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 题目 Give you a number on base ten,you should output it on base two.(0 < n < 1000) Input For each case there is a postive number n on base ten, en 阅读全文
posted @ 2016-05-23 21:56 Pic 阅读(130) 评论(0) 推荐(0) 编辑