码迷,mamicode.com
首页 >  
搜索关键字:背包dp    ( 292个结果
ZOJ 2109 FatMouse' Trade (背包 dp + 贪婪)
链接: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
BZOJ 2287: 【POJ Challenge】消失之物( 背包dp )
虽然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
POJ 3624 Charm Bracelet 背包问题的解决方案
最简单的背包问题,标题应该是除了背包测试中心:您无法打开二维数组。我还没有开的二维。光看数据是不可能的。太大。有两种方法来提高全省内存DP:1 所谓卷的阵列2 反向表久没做背包DP,突然认为这样的背包问题非常easy了。以下给出两种解法:1 calBag()是滚动数组2 calBag2()是逆向填表...
分类:其他好文   时间:2015-07-16 13:46:10    阅读次数:101
【日常学习】【背包DP】codevs1115 开心的金明题解
题目来源是06年NOIP普及组第二题,非常简单,就是裸的0/1背包 直接上题目 题目描述 Description 金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间他自己专用的很宽敞的房间。更让他高兴的是,妈妈昨天对他说:“你的房间需要购买哪些物品,怎么布置,你说了算,只要不超过N元钱就行”。今天一早金明就开始做预算,但是他想买的东西太多了,肯定会超过妈妈限定的N元。于...
分类:其他好文   时间:2015-07-13 18:50:39    阅读次数:95
hdu3535 AreYouBusy
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
poj3211 Washing Clothes
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
hdu1712 ACboy needs your help
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
zoj3623 Battle Ships
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
poj2063 Investment
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
poj3260 The Fewest Coins
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
292条   上一页 1 ... 20 21 22 23 24 ... 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!