Piggy-Bank
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Before ACM can do anything, a budget must be prepared and the necessar...
分类:
其他好文 时间:
2014-07-30 17:26:54
阅读次数:
202
Description
Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea beh...
分类:
其他好文 时间:
2014-07-29 15:08:28
阅读次数:
232
题意:用所给的硬币面值构成所需的面值
思路:因为所用硬币数量不限,所以很容易想到完全背包。
递推:
#include
#include
#include
#include
using namespace std;
const int MAXN = 10005;
int n;
int coin[] = {1, 5, 10, 25, 50};
long long d...
分类:
其他好文 时间:
2014-07-29 15:02:39
阅读次数:
214
呵呵,过了这么久还来刷水题实在是不好意思。本题属于完全背包,就是一模板题,不过窝还是要来水一下。嘻嘻
寒冰王座
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 10588 Accepte...
分类:
其他好文 时间:
2014-07-29 14:50:58
阅读次数:
203
Problem Description
After months of hard working, Iserlohn finally wins awesome amount of scholarship. As a great zealot of sneakers, he decides to spend all his money on them in a sneaker store.
...
分类:
其他好文 时间:
2014-07-29 14:42:05
阅读次数:
273
http://acm.hdu.edu.cn/showproblem.php?pid=1028
整数划分问题。
第一道母函数。。。
小于等于n的整数共有n个,1,2......n,每个数都有无限多个,对于整数1,它所对应的母函数为(1+x+x^2+...+x^k+...),整数2对应的母函数为(1+x^2+X^4+...+x^(2*k)+...),整数3对应的母函数为(1+x^...
分类:
其他好文 时间:
2014-07-28 00:16:19
阅读次数:
279
http://acm.hdu.edu.cn/showproblem.php?pid=1398
题意:有价值为1^2,2^2....7^2的硬币共17种,每种硬币都有无限个。问用这些硬币能够组成价值为n的钱数共有几种方案数。
母函数:
#include
#include
#include
#include
#include
#include
#include
#i...
分类:
其他好文 时间:
2014-07-28 00:03:19
阅读次数:
219
今天做数论的题目时,遇到一道多重背包的问题。好久没做过背包了,一时有点迷糊,当时理解的也不是很透彻,果断把背包九讲重新看了一遍。这里做下总结,加深自己的理解。
背包问题求的是在花费一定代价(物品的重量或体积)下,一个背包装入物品后所获得的最大价值。总的包括三种基本的背包:01背包,完全背包,多重背包。还有由这三种背包延伸出来的问题:混合背包,二维费用的背包,分组背包,背包问题问法的变化等...
分类:
其他好文 时间:
2014-07-26 15:00:21
阅读次数:
262
cf分要高涨了。。。这题 就是个裸体啊 只要读懂题意 现在还是喜欢多做些英文的题目... touch me做这题的时候 突然发现 自己对V的遍历顺序为什么在完全背包是顺序 和在01背包是逆序懂了好多.... 1 #include 2 #include 3 using namespac...
分类:
其他好文 时间:
2014-07-25 14:26:41
阅读次数:
281
The Fewest CoinsDescriptionFarmer John has gone to town to buy some farm supplies. Being a very efficient man, he always pays for his goods in such a ...
分类:
其他好文 时间:
2014-07-24 17:11:36
阅读次数:
326