
背包型动态规划
文章平均质量分 51
dxyinme
这个作者很懒,什么都没留下…
展开
-
[POJ1742]Coins
Time Limit: 3000MS Memory Limit: 30000KDescriptionPeople 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 were so...原创 2018-04-05 10:37:17 · 414 阅读 · 0 评论 -
[附中OJ 1772] 0/1背包问题之2
时间限制: 1 Sec 内存限制: 128 MB题目描述 有n个重量和价值分别为wi,vi的物品。从这些物品中挑选出总重量不超过W的物品,求所有挑选方案中价值总和最大值。输入 输入的第一行为一个整数n;第二行到第n+1行,每行两个整数,第i+1分别表示第i个物品重量wi与价值vi;最后一行有一个整数W,表示挑选出的物品总重量限制。输出 输出只有一个整数,...原创 2017-06-21 11:25:18 · 410 阅读 · 0 评论 -
[vijos P1037]搭建双塔
描述2001年9月11日,一场突发的灾难将纽约世界贸易中心大厦夷为平地,Mr. F曾亲眼目睹了这次灾难。为了纪念“9?11”事件,Mr. F决定自己用水晶来搭建一座双塔。 Mr. F有N块水晶,每块水晶有一个高度,他想用这N块水晶搭建两座有同样高度的塔,使他们成为一座双塔,Mr. F可以从这N块水晶中任取M(1≤M≤N)块来搭建。但是他不知道能否使两座塔有同样的高度,也不知道如果能搭建成一座...原创 2017-04-09 20:24:23 · 457 阅读 · 0 评论 -
[洛谷1164]小A点菜
题目背景 uim神犇拿到了uoi的ra(镭牌)后,立刻拉着基友小A到了一家……餐馆,很低端的那种。 uim指着墙上的价目表(太低级了没有菜单),说:“随便点”。 题目描述 不过uim由于买了一些辅(e)辅(ro)书,口袋里只剩M元(M<=10000)。 餐馆虽低端,但是菜品种类不少,有N种(N<=100),第i种卖ai元(ai<=1000)。由于是很低端的餐馆,所以每种菜...原创 2016-08-09 13:02:22 · 837 阅读 · 0 评论 -
[POJ2392]Space Elevator
DescriptionThe cows are going to space! They plan to achieve orbit by building a sort of space elevator: a giant tower of blocks. They have K(1<=K<=400)K(1<=K<=400)K (1 hi(1<=hi<=1...原创 2018-08-06 19:39:53 · 244 阅读 · 0 评论 -
[codeforces366C]Dima and Salad
time limit per test : 1 secondmemory limit per test : 256 megabytesDima, Inna and Seryozha have gathered in a room. That’s right, someone’s got to go. To cheer Seryozha up and inspire him to have a ...原创 2018-11-03 19:29:49 · 291 阅读 · 0 评论 -
[HDU3127]WHUgirls
Problem DescriptionThere are many pretty girls in Wuhan University, and as we know, every girl loves pretty clothes, so do they. One day some of them got a huge rectangular cloth and they want to cut...原创 2019-01-23 23:45:57 · 277 阅读 · 0 评论 -
[codeforces1110D]Jongmah
time limit per test:3 secondsmemory limit per test:256 megabytesYou are playing a game of Jongmah. You don’t need to know the rules to solve this problem. You have n tiles in your hand. Each tile ha...原创 2019-02-08 13:02:07 · 735 阅读 · 0 评论