05 2016 档案

摘要:有一类背包问题中背包的体积很大但是价值很小,这种背包中如果按照正常的思维来写的话很容易超内存,可以换种思维,dp[I]表示价值为I的价值用的最小空间;例题:Knapsack problemCrawling inprocess... Crawlingfailed DescriptionGive... 阅读全文
posted @ 2016-05-29 16:28 勿忘初心0924 阅读(396) 评论(0) 推荐(0) 编辑
摘要:有一类背包问题中背包的体积很大但是价值很小,这种背包中如果按照正常的思维来写的话很容易超内存,可以换种思维,dp[I]表示价值为I的价值用的最小空间;例题:Knapsack problemCrawling inprocess... Crawlingfailed DescriptionGive... 阅读全文
posted @ 2016-05-29 16:28 勿忘初心0924 阅读(964) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionWhuacmers usecoins.They have coins of value A1,A2,A3...An Silverland dollar. Oneday Hibix opened purse and found there were some... 阅读全文
posted @ 2016-05-25 10:56 勿忘初心0924 阅读(239) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionWhuacmers usecoins.They have coins of value A1,A2,A3...An Silverland dollar. Oneday Hibix opened purse and found there were some... 阅读全文
posted @ 2016-05-25 10:56 勿忘初心0924 阅读(762) 评论(0) 推荐(0) 编辑
摘要:约瑟夫环问题就是n个人围成一圈,然后循环报数,每次喊道k的人出列;递归实现:例:10个人,0~9号围成一圈,k为3;递归的数据为,m个人,说k的出列当前在第几个人,intfun(int m,intk,int I){ if(i==1) return(m+k-1)%m;//意思... 阅读全文
posted @ 2016-05-23 18:24 勿忘初心0924 阅读(137) 评论(0) 推荐(0) 编辑
摘要:约瑟夫环问题就是n个人围成一圈,然后循环报数,每次喊道k的人出列;递归实现:例:10个人,0~9号围成一圈,k为3;递归的数据为,m个人,说k的出列当前在第几个人,intfun(int m,intk,int I){ if(i==1) return(m+k-1)%m;//意思... 阅读全文
posted @ 2016-05-23 18:24 勿忘初心0924 阅读(158) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA Fibonacci sequence is calculated byadding the previous two members the sequence, with the first twomembers being both 1.F(1) =... 阅读全文
posted @ 2016-05-22 22:28 勿忘初心0924 阅读(106) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA Fibonacci sequence is calculated byadding the previous two members the sequence, with the first twomembers being both 1.F(1) =... 阅读全文
posted @ 2016-05-22 22:28 勿忘初心0924 阅读(138) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionGiven a positive integer N, you shouldoutput the leftmost digit of N^N. InputThe input contains several test cases.The first lin... 阅读全文
posted @ 2016-05-16 10:32 勿忘初心0924 阅读(104) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionGiven a positive integer N, you shouldoutput the leftmost digit of N^N. InputThe input contains several test cases.The first lin... 阅读全文
posted @ 2016-05-16 10:32 勿忘初心0924 阅读(336) 评论(0) 推荐(0) 编辑
摘要:借鉴于 http://www.ruanyifeng.com/blog/2015/09/matrix-multiplication.html数字乘矩阵:将每个位置的数字都与常数相乘矩阵加矩阵:将各个位置的数字相加矩阵乘矩阵:这个矩阵相乘怎么理解看了别人的博客才懂的,借鉴博客地址在文章开头;具体... 阅读全文
posted @ 2016-05-07 10:30 勿忘初心0924 阅读(215) 评论(0) 推荐(0) 编辑
摘要:借鉴于 http://www.ruanyifeng.com/blog/2015/09/matrix-multiplication.html数字乘矩阵:将每个位置的数字都与常数相乘矩阵加矩阵:将各个位置的数字相加矩阵乘矩阵:这个矩阵相乘怎么理解看了别人的博客才懂的,借鉴博客地址在文章开头;具体... 阅读全文
posted @ 2016-05-07 10:30 勿忘初心0924 阅读(181) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionQueues andPriority Queues are data structures which are known to mostcomputer scientists. The Queue occurs often in our daily li... 阅读全文
posted @ 2016-05-07 10:25 勿忘初心0924 阅读(154) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionQueues andPriority Queues are data structures which are known to mostcomputer scientists. The Queue occurs often in our daily li... 阅读全文
posted @ 2016-05-07 10:25 勿忘初心0924 阅读(128) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionNowadays, weall know that Computer College is the biggest department in HDU.But, maybe you don't know that Computer College had ... 阅读全文
posted @ 2016-05-04 15:04 勿忘初心0924 阅读(177) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionNowadays, weall know that Computer College is the biggest department in HDU.But, maybe you don't know that Computer College had ... 阅读全文
posted @ 2016-05-04 15:04 勿忘初心0924 阅读(164) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionRecently, iSeawent to an ancient country. For such a long time, it was the mostwealthy and powerful kingdom in the world. As a r... 阅读全文
posted @ 2016-05-03 22:43 勿忘初心0924 阅读(142) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionRecently, iSeawent to an ancient country. For such a long time, it was the mostwealthy and powerful kingdom in the world. As a r... 阅读全文
posted @ 2016-05-03 22:43 勿忘初心0924 阅读(143) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionMany years ago, in Teddy’s hometown there was a man who was called “BoneCollector”. This man like to collect varies of bones , s... 阅读全文
posted @ 2016-05-03 22:40 勿忘初心0924 阅读(158) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionMany years ago, in Teddy’s hometown there was a man who was called “BoneCollector”. This man like to collect varies of bones , s... 阅读全文
posted @ 2016-05-03 22:40 勿忘初心0924 阅读(129) 评论(0) 推荐(0) 编辑
摘要:DescriptionThere is an beautiful ellipse whose curve equation is: b > 0)" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" real_sr... 阅读全文
posted @ 2016-05-01 21:28 勿忘初心0924 阅读(157) 评论(0) 推荐(0) 编辑
摘要:DescriptionThere is an beautiful ellipse whose curve equation is: b > 0)" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" real_sr... 阅读全文
posted @ 2016-05-01 21:28 勿忘初心0924 阅读(220) 评论(0) 推荐(0) 编辑
摘要:DescriptionIn mathematics, a polygonal number is a numberrepresented as dots or pebbles arranged in the shape of a regularpolygon. The dots are tho... 阅读全文
posted @ 2016-05-01 21:18 勿忘初心0924 阅读(105) 评论(0) 推荐(0) 编辑
摘要:DescriptionIn mathematics, a polygonal number is a numberrepresented as dots or pebbles arranged in the shape of a regularpolygon. The dots are tho... 阅读全文
posted @ 2016-05-01 21:18 勿忘初心0924 阅读(158) 评论(0) 推荐(0) 编辑
摘要:DescriptionLast week, n students participated in the annualprogramming contest of Marjar University. Students are labeled from1 to n. They came to ... 阅读全文
posted @ 2016-05-01 21:09 勿忘初心0924 阅读(123) 评论(0) 推荐(0) 编辑
摘要:DescriptionLast week, n students participated in the annualprogramming contest of Marjar University. Students are labeled from1 to n. They came to ... 阅读全文
posted @ 2016-05-01 21:09 勿忘初心0924 阅读(147) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA group ofresearchers are designing an experiment to test the IQ of a monkey.They will hang a banana at the roof of a building, ... 阅读全文
posted @ 2016-05-01 20:16 勿忘初心0924 阅读(142) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA group ofresearchers are designing an experiment to test the IQ of a monkey.They will hang a banana at the roof of a building, ... 阅读全文
posted @ 2016-05-01 20:16 勿忘初心0924 阅读(187) 评论(0) 推荐(0) 编辑