链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1109FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the wa...
分类:
其他好文 时间:
2015-07-21 20:32:47
阅读次数:
134
虽然A掉了但是时间感人啊....f( x, k ) 表示使用前 x 种填满容量为 k 的背包的方案数, g( x , k ) 表示使用后 x 种填满容量为 k 的背包的方案数.丢了第 i 个, 要填满容量为 k 的背包 , 则 ans( i , k ) = ∑ f( i - 1, h ) * g( ...
分类:
其他好文 时间:
2015-07-18 14:03:47
阅读次数:
131
最简单的背包问题,标题应该是除了背包测试中心:您无法打开二维数组。我还没有开的二维。光看数据是不可能的。太大。有两种方法来提高全省内存DP:1 所谓卷的阵列2 反向表久没做背包DP,突然认为这样的背包问题非常easy了。以下给出两种解法:1 calBag()是滚动数组2 calBag2()是逆向填表...
分类:
其他好文 时间:
2015-07-16 13:46:10
阅读次数:
101
题目来源是06年NOIP普及组第二题,非常简单,就是裸的0/1背包
直接上题目
题目描述 Description
金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间他自己专用的很宽敞的房间。更让他高兴的是,妈妈昨天对他说:“你的房间需要购买哪些物品,怎么布置,你说了算,只要不超过N元钱就行”。今天一早金明就开始做预算,但是他想买的东西太多了,肯定会超过妈妈限定的N元。于...
分类:
其他好文 时间:
2015-07-13 18:50:39
阅读次数:
95
Problem Description
Happy New Term!
As having become a junior, xiaoA recognizes that there is not much time for her to AC problems, because there are some other things for her to do, which makes h...
分类:
其他好文 时间:
2015-07-02 15:47:02
阅读次数:
163
Description
Dearboy was so busy recently that now he has piles of clothes to wash. Luckily, he has a beautiful and hard-working girlfriend to help him. The clothes are in varieties of colors but ea...
分类:
其他好文 时间:
2015-07-02 12:13:34
阅读次数:
104
Problem Description
ACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from different course depending on the days he spend on it.How to ...
分类:
其他好文 时间:
2015-07-01 16:07:21
阅读次数:
135
Battle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a defense tower, which has L longevity. The player has a military
factory, which can produce N kinds of batt...
分类:
其他好文 时间:
2015-06-30 22:04:47
阅读次数:
199
Description
John never knew he had a grand-uncle, until he received the notary's letter. He learned that his late grand-uncle had gathered a lot of money, somewhere in South-America, and that John ...
分类:
其他好文 时间:
2015-06-30 22:04:06
阅读次数:
131
Description
Farmer John has gone to town to buy some farm supplies. Being a very efficient man, he always pays for his goods in such a way that the smallest number of coins changes hands, i.e., the...
分类:
其他好文 时间:
2015-06-30 18:32:13
阅读次数:
141