
背包
lyhvoyage
不抛弃,不放弃!
展开
-
hdu 2844 Coins 多重背包
Coins Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionW原创 2013-04-09 14:26:31 · 3330 阅读 · 1 评论 -
超大背包问题(01背包)
超大背包问题:有n个重量和价值分别为w[i]和v[i]的物品,从这些物品中挑选总重量不超过W的物品,求所有挑选方案中价值总和的最大值。其中,1 ≤ n ≤ 40, 1 ≤ w[i], v[i] ≤ 10^15, 1 ≤ W ≤ 10^15.这个问题给人的第一感觉就是普通的01背包。不过,看完数据范围会发现,这次价值和重量都可以是非常大的数值,相比之下n比较小。使用DP求解背包为题的复杂度是O(原创 2014-10-08 09:48:43 · 12281 阅读 · 2 评论 -
poj 3211 Washing Clothes 分组01背包
Washing ClothesTime Limit: 1000MS Memory Limit: 131072KDescriptionDearboy was so busy recently that now he has piles of clothes to wash. Luckily, he has a beautiful and h原创 2013-11-30 16:58:50 · 2623 阅读 · 0 评论 -
POJ 3628 Bookshelf 2 (01背包)
Bookshelf 2Time Limit: 1000MS Memory Limit: 65536KDescriptionFarmer John recently bought another bookshelf for the cow library, but the shelf is getting filled up quite原创 2013-11-30 17:22:25 · 2129 阅读 · 2 评论 -
hdu 1059 Dividing 多重背包
Dividing Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem Description原创 2013-04-07 10:54:16 · 1299 阅读 · 0 评论 -
hdu 3033 I love sneakers! 分组背包
I love sneakers! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Descr原创 2013-04-09 15:45:59 · 3504 阅读 · 1 评论 -
hdu 3496 Watch The Movie 二维01背包
Watch The Movie Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Problem DescriptionNe原创 2013-04-09 10:50:27 · 1981 阅读 · 0 评论 -
hdu 2159 FATE 二维背包
FATE Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description最近xhd正在玩原创 2013-04-08 18:33:15 · 1129 阅读 · 0 评论 -
hdu 4501 小明系列故事——买年货 多重背包
小明系列故事——买年货 Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Problem Description原创 2013-04-09 20:54:20 · 1530 阅读 · 0 评论 -
POJ 1837 Balance(动态规划之背包问题)
BalanceTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 11436 Accepted: 7130DescriptionGigel has a strange "balance" and he wants to poise it. Actually,原创 2015-04-15 20:12:42 · 2295 阅读 · 1 评论