随笔分类 - DP
摘要:1084: [USACO 3.1.6]邮票Time Limit:1 SecMemory Limit:64 MBSubmit:122Solved:33SubmitStatusWeb BoardDescription已知一个 N 枚邮票的面值集合(如,{1 分,3 分})和一个上限 K —— 表示信封上能够贴 K 张邮票。计算从 1 到 M 的最大连续可贴出的邮资。 例如,假设有 1 分和 3 分的邮票;你最多可以贴 5 张邮票。很容易贴出 1 到 5 分的邮资(用 1 分邮票贴就行了),接下来的邮资也不难:6 = 3 + 37 = 3 + 3 + 18 = 3 + 3 + 1 + 19 = 3
阅读全文
摘要:CSUST 10811081: [USACO 2.3.4]货币系统Time Limit:1 SecMemory Limit:64 MBSubmit:142Solved:54SubmitStatusWeb BoardDescription母牛们不但创建了他们自己的政府而且选择了建立了自己的货币系统。 [In their own rebellious way],,他们对货币的数值感到好奇。传统地,一个货币系统是由1,5,10,20 或 25,50, 和 100的单位面值组成的。母牛想知道有多少种不同的方法来用货币系统中的货币来构造一个确定的数值。举例来说, 使用一个货币系统 {1,2,5,10,.
阅读全文
摘要:原题链接:http://poj.org/problem?id=3280CSUST:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=20437#problem/C转载来自:http://blog.sina.com.cn/s/articlelist_1836701754_0_1.htmlCheapest PalindromeTime Limit:2000MSMemory Limit:65536KTotal Submissions:4305Accepted:2091DescriptionKeeping track of all the co
阅读全文
摘要:原题链接:http://poj.org/problem?id=1159博文转载链接:http://blog.sina.com.cn/s/blog_6d79d83a01016iqg.htmlPalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:45704Accepted:15580DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from righ
阅读全文
摘要:原题链接:http://poj.org/problem?id=3624我的链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=20437#problem/A欢迎来水Charm BraceletTime Limit:1000MSMemory Limit:65536KTotal Submissions:14963Accepted:6840DescriptionBessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she
阅读全文
摘要:算法:DP题目来源:2012年9月16日成都赛区网络赛 1006 Groups原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=4293GroupsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 511Accepted Submission(s): 203Problem Description After the regional contest, all the ACMers are walkin.
阅读全文
摘要:DP(关于抢银行概率的那道==)题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2955RobberiesTime Limit: 2000/1000 MS(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):4778Accepted Submission(s): 1808Problem DescriptionThe aspiringRoy the Robberhas seen a lot of American movies, and knows that
阅读全文
摘要:DP(关于抢银行概率的那道==)题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2955RobberiesTime Limit: 2000/1000 MS(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):4778Accepted Submission(s): 1808Problem DescriptionThe aspiringRoy the Robberhas seen a lot of American movies, and knows that
阅读全文
摘要:快速链接:http://poj.org/problem?id=2063CSUST 2012年暑假8月组队后第八次个人赛:http://acm.hust.edu.cn:8080/judge/contest/view.action?cid=11473#problem/DInvestmentTime Limit:1000MSMemory Limit:30000KTotal Submissions:5370Accepted:1848DescriptionJohn never knew he had a grand-uncle, until he received the notary's le
阅读全文
摘要:DP背包(注意减少内存的转换)快速链接:http://poj.org/problem?id=2063CSUST 2012年暑假8月组队后第八次个人赛:http://acm.hust.edu.cn:8080/judge/contest/view.action?cid=11473#problem/DInvestmentTime Limit:1000MSMemory Limit:30000KTotal Submissions:5370Accepted:1848DescriptionJohn never knew he had a grand-uncle, until he received the
阅读全文
摘要:DP(呃,两边不交叉修路的那道。。。)题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1025Constructing Roads In JGShining's KingdomTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9069Accepted Submission(s): 2579Problem DescriptionJGShining's kingdom consists o
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1025Constructing Roads In JGShining's KingdomTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9069Accepted Submission(s): 2579Problem DescriptionJGShining's kingdom consists of 2n(n is no more t
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1058Humble NumbersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9933Accepted Submission(s): 4291Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequ
阅读全文
摘要:DP&&英语==题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1058Humble NumbersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9933Accepted Submission(s): 4291Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble
阅读全文
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2084数塔Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11282Accepted Submission(s): 6761Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个D
阅读全文
摘要:题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1176免费馅饼Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14396Accepted Submission(s): 4763Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2602 Bone CollectorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13839Accepted Submission(s): 5454Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was ca...
阅读全文
摘要:最经典、最基础的01背包入门题目题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2602Bone CollectorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13839Accepted Submission(s): 5454Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called
阅读全文
摘要:最经典、最基础的01背包入门题目题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2602Bone CollectorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13839Accepted Submission(s): 5454Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1506Largest Rectangle in a HistogramTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5475Accepted Submission(s): 1570Problem DescriptionA histogram is a polygon composed of a sequence of rectangles alig
阅读全文

浙公网安备 33010602011771号