动态规划
文章平均质量分 84
luckyrass
一枚不靠谱的媛媛~mua
展开
-
Coin Change(UVA 674)
Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of money.For example, if we have 11 cents, then原创 2015-03-20 14:49:08 · 512 阅读 · 0 评论 -
Unidirectional TSP(UVA 116)
BackgroundProblems that require minimum paths through some domain appear in many different areas of computer science. For example, one of the constraints in VLSI routing problems is minimizing wir原创 2015-03-20 14:40:53 · 483 阅读 · 0 评论 -
Cow Bowling(POJ 3176)
A - Cow BowlingTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 3176Appoint description: System Crawler (2015-02-11)Descrip原创 2015-02-16 14:35:45 · 381 阅读 · 0 评论 -
Human Gene Functions(POJ 1080)
B - Human Gene FunctionsTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 1080Appoint description: System Crawler (2015-02-14)原创 2015-02-16 15:14:44 · 417 阅读 · 0 评论 -
Palindrome(POJ 1159)
C - PalindromeTime Limit:3000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 1159Appoint description: System Crawler (2015-02-13)Descript原创 2015-02-17 09:22:32 · 385 阅读 · 0 评论 -
Cash Machine(POJ 1276)
转自:優YoU http://user.qzone.qq.com/289065406/blog/1299341477提示:动态规划,多重背包 题目大意:有各种不同面值的货币,每种面值的货币有不同的数量,请找出利用这些货币可以凑成的最接近且小于等于给定的数字cash的金额。 初始思路:多重背包问题,第i种面额d[i]有 n[i]+1种选择转载 2015-02-07 13:00:53 · 320 阅读 · 0 评论 -
Balance( POJ1837)
转自:優YoU http://user.qzone.qq.com/289065406/blog/1299341345提示:动态规划,01背包初看此题第一个冲动就是穷举。。。。不过再细想肯定行不通= =O(20^20)等着超时吧。。。我也是看了前辈的意见才联想到01背包,用动态规划来解 题目大意:有一个天平,天平左右两边各有若干个钩子,总共有C转载 2015-02-07 12:08:48 · 354 阅读 · 0 评论 -
Coin Change(UVA 674)
题目翻译:有五种类型的硬币,面值分别为1分,5分,10分,25分,50分。现在你有n分钱,需要换为这五种硬币,请问最多有多少种换法。输入最多有7489 分钱。Input The input file contains any number of lines, each one consisting of a number for the amount of money in c原创 2015-02-05 18:59:58 · 486 阅读 · 0 评论 -
Always on the run(UVA 590)
DescriptionScreeching tires. Searching lights. Wailing sirens. Police cars everywhere. Trisha Quickfinger did it again! Stealing the `Mona Lisa' had been more difficult than planned, but b原创 2015-03-20 15:11:00 · 473 阅读 · 0 评论