Coins Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 34814 Accepted: 11828 Description People in Silverland use coins.They have coins of v ...
分类:
其他好文 时间:
2016-08-22 23:27:56
阅读次数:
143
Gym 101047M Removing coins in Kem Kadrãn Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Practice Gym 101047M Removing coins in K ...
分类:
其他好文 时间:
2016-08-22 23:03:48
阅读次数:
178
Description People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there ...
分类:
其他好文 时间:
2016-08-20 13:17:05
阅读次数:
211
Regionals 1996 >> Europe - Northwestern
问题链接:UVALive5583 UVA562 Dividing coins。
题意简述:输入测试用例数n,每个测试用例包括金币的数量m和m个正整数是金币的币值。将这些金币分为两堆,使得其差值最小,求最小的差值。
问题分析:可以用0/1背包的动态规划方法来解决这个问题。将背包的容量设为所有金币币值之和的一...
分类:
其他好文 时间:
2016-08-13 12:56:52
阅读次数:
167
原题链接:点击此处 解题思路: 多重背包问题,不太理解,理解了再补充。 网上博客的思路是: 对于每个硬币而言: IF 价值×数量>=m THEN 取这个硬币的次数相当于无限制,可以考虑成完全背包 ELSE THEN 考虑成0-1背包(二进制优化),就是把这个硬币的v和num组合出0-1背包可能出现的 ...
分类:
其他好文 时间:
2016-08-13 11:15:26
阅读次数:
161
给定一个序列,只能拿走D,隔壁的会翻转,问能否全部拿走。 注意到如果能拿走的话,拿D的顺序是没关系的。模拟即可 #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> ...
分类:
其他好文 时间:
2016-08-12 00:50:57
阅读次数:
176
最开始超时,因为输入函数,所以改成了scanf这些,然后数组太大,还是超时,之后太小了程序崩溃,改完这些一直wa,然后我就没办法了 无奈脸 ...
分类:
其他好文 时间:
2016-08-11 17:25:16
阅读次数:
127
Description Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. ...
分类:
其他好文 时间:
2016-08-08 21:03:41
阅读次数:
164
题目链接: http://poj.org/problem?id=2000 Description The king pays his loyal knight in gold coins. On the first day of his service, the knight receives on ...
分类:
其他好文 时间:
2016-08-08 20:54:46
阅读次数:
144
H - Coins Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u H - Coins Description Whuacmers use coins.They have coins of value A1,A ...
分类:
其他好文 时间:
2016-08-07 23:22:00
阅读次数:
225