
编程题——动态规划
文章平均质量分 86
David_Jett
我要变得很强!2017-8-30
展开
-
HDU 4800 Josephina and RPG(动态规划)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4800题面:Josephina and RPGTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1077 Acc原创 2015-07-27 11:38:57 · 1376 阅读 · 0 评论 -
HDU 5800 To My Girlfriend (动态规划)
题目链接:HDU 5800题面:To My GirlfriendTime Limit: 2000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 737 Accepted Submission(s): 292Problem原创 2016-08-07 10:54:07 · 1555 阅读 · 0 评论 -
HDU 2045 不容易系列之(3)—— LELE的RPG难题 (动态规划)
题目链接:HDU 2045题面:不容易系列之(3)—— LELE的RPG难题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 45099 Accepted Submission(s): 18054原创 2016-08-07 16:06:03 · 820 阅读 · 0 评论 -
HDU 2602 Bone Collector (01背包)
题目链接:HDU 2602题面:Bone CollectorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 51402 Accepted Submission(s): 21624Proble原创 2016-08-06 15:24:38 · 714 阅读 · 0 评论 -
HDU 5534 Partial Tree(动态规划)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5534题面:Partial TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 763 Accepte原创 2016-07-05 18:44:09 · 971 阅读 · 0 评论 -
UVA 10635 Prince and Princess (最长公共子序列+最长上升子序列)
题目大意: 给定两串数字序列,每串数字都不重复,求两串序列的最长公共序列。解题: 求两序列的复杂度为n^2,可以转换为求构造后的序列的最长上升子序列,复杂度转换为Nlog(N)。可以参考这篇博客LCS最长公共子序列代码:#include #include #include #include #include using namespace原创 2016-05-10 22:35:36 · 666 阅读 · 0 评论 -
HDU 5707 Combine String (DP)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5707题面:Combine StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 395 Accepte原创 2016-07-04 19:35:16 · 679 阅读 · 0 评论 -
HDU 2571 命运(简单DP)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2571题面:命运Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15333 Accepted Submis原创 2016-05-10 22:19:02 · 959 阅读 · 0 评论 -
HDU 2067 小兔的棋盘(动态规划)
传送门题面:小兔的棋盘Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8863 Accepted Submission(s): 4613Problem Description小兔的叔叔从外面原创 2016-05-02 12:06:11 · 1201 阅读 · 0 评论 -
URAL 1029 Ministry
题目链接:URAL 1029题面:1029. MinistryTime limit: 1.0 secondMemory limit: 64 MBMr. F. wants to get a document be signed by a minister. A minister signs a document only if it is approved by原创 2016-01-29 13:39:54 · 959 阅读 · 0 评论 -
【打CF,学算法——三星级】Codeforces 9C Hexadecimal's Numbers (解法汇总)
题目链接:http://codeforces.com/problemset/problem/9/C题面:原创 2015-10-05 10:07:54 · 1121 阅读 · 0 评论 -
HDU 5115 Dire Wolf(区间dp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5115题面:Dire WolfTime Limit: 5000/5000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 687 Accepted原创 2015-07-16 22:54:31 · 1089 阅读 · 0 评论 -
【打CF,学算法——三星级】Codeforces 698A Vacations (动态规划)
【CF简介】题目链接:CF 698A题面:A. Vacationstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has n days原创 2016-07-20 14:57:27 · 1910 阅读 · 2 评论 -
【打CF,学算法——五星级】CodeForces 478D (dp计数)
【CF简介】提交链接:CF 478D题面:D. Red-Green Towerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere原创 2016-07-12 11:11:33 · 930 阅读 · 0 评论 -
【打CF,学算法——四星级】CodeForces 31E TV Game (动态规划)
题目链接:CF 31E题面:E. TV Gametime limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputDescriptionThere原创 2016-07-12 09:31:19 · 1242 阅读 · 0 评论 -
背包九讲(转载)
收藏下,开始慢慢消化咯!!(转载自http://blog.youkuaiyun.com/sky_fighting/article/details/8789067)目录第一讲 01背包问题这是最基本的背包问题,每个物品最多只能放一次。第二讲 完全背包问题第二个基本的背包问题模型,每种物品可以放无限多次。第三讲 多重背包问题每种物品有一个固定的次数上限。第四讲 混合三种背包转载 2015-07-16 18:31:02 · 750 阅读 · 0 评论 -
HDU 5366 The mook jong (动态规划,详解)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5366题面:The mook jongAccepts: 221Submissions: 306Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)原创 2015-08-09 15:21:59 · 1497 阅读 · 0 评论 -
HDU 4791 Alice's Print Service
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4791题面:Alice's Print ServiceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1596 Acc原创 2015-07-16 19:13:23 · 1430 阅读 · 0 评论 -
HDU 5375 Gray code (简单dp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5375题面:Gray codeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 626 Accepted Submi原创 2015-08-13 09:42:35 · 1044 阅读 · 0 评论 -
HDU 5074 Hatsune Miku (动态规划)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5074题面:Hatsune MikuTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 810 Accepte原创 2015-07-27 13:30:10 · 1057 阅读 · 0 评论 -
HDU 5389 Zero Escape(dp解法详解) 已更新
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5389题面:Zero EscapeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 164 Accepted原创 2015-08-13 19:30:34 · 1713 阅读 · 7 评论 -
HDU 5445 Food Problem(多重背包)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5445参考来源:http://blog.youkuaiyun.com/mr_xujh/article/details/48435527题面:Food ProblemTime Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/1原创 2015-09-15 16:48:22 · 980 阅读 · 0 评论 -
HDU 5045 Contest (状态压缩dp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5045题面:ContestTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1237 Accepted Subm原创 2015-10-05 09:27:34 · 543 阅读 · 0 评论 -
UVA 10891 Game of Sum(区间DP),
题意:解题:代码:#include #include #include #include #include #include #include #define inf 0x3f3f3f3fusing namespace std;int dp[105][105],val[105],sum[105];int get_sum(int a,int原创 2016-05-09 23:11:03 · 932 阅读 · 0 评论 -
UVA 10859 Placing Lampposts(树形DP)
题意: 给定一张有向无环图,每个节点视作一个路口,每条边视作路,要求挑选一些节点放置路灯,使每条路都能被路灯照到,且使用的路灯数最少,如若存在使用相同路灯数的情况,则使得能被两盏路灯照到的路的数量尽量多。解题: 可以将此问题提炼一下,就是使用最少的路灯照亮所有的路,使得被两盏路灯照亮的路尽量多,也就是使被一盏路灯照亮的路尽量少。那么问题可以转换为,使用最少原创 2016-05-10 22:04:41 · 855 阅读 · 0 评论 -
HDU 1297 Children’s Queue
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1297题面:Children’s QueueTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13363 A原创 2016-05-02 22:53:38 · 793 阅读 · 0 评论 -
POJ 2151 Check the difficulty of problems
题目链接:POJ 2151 Check the difficulty of problems题面:Check the difficulty of problemsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5519 Accepted: 2431原创 2015-05-08 23:50:24 · 810 阅读 · 0 评论