
背包
文章平均质量分 78
IF_I
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Cash Machine(POJ--1276 【多重背包】
Description A Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill denominat原创 2015-08-19 11:22:43 · 268 阅读 · 0 评论 -
Balance(POJ--1837
Description Gigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance. It orders two arms of negligible weight and each arm's length原创 2015-08-18 20:40:27 · 349 阅读 · 0 评论 -
钱币兑换问题(完全背包问题)
H - 钱币兑换问题 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。原创 2015-02-14 23:12:35 · 607 阅读 · 0 评论 -
寒冰王座(完全背包问题)
F - 寒冰王座 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买原创 2015-02-14 22:51:08 · 529 阅读 · 0 评论 -
饭卡
B - 饭卡 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可原创 2015-02-14 22:44:04 · 329 阅读 · 0 评论 -
Bone Collector
A - Bone Collector Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description Many years ago , in Teddy’s hometown there was a m原创 2015-02-14 22:24:10 · 354 阅读 · 0 评论 -
一维的01背包问题
2015年寒假集训第一次周赛的一道题:点击打开链接。 #include int max(int a,int b) { return a>b?a:b; } int w[3405],d[3405],sum[13000]; int main() { int n,m,i,j; scanf("%d %d",&n,&m); for(i=0; i<n;原创 2015-01-24 13:41:05 · 968 阅读 · 0 评论 -
CRB and His Birthday(HDUOJ--5410
Problem Description Today is CRB's birthday. His mom decided to buy many presents for her lovely son. She went to the nearest shop with M Won(currency unit). At the shop, there are N kinds原创 2015-08-20 19:48:20 · 509 阅读 · 0 评论 -
来发背包开开胃(OJ--3303
题目描述 多组输入。对于每组输入: (1 )接下来的n行,每行三个整数Si,Pi,Mi,分别代表第i种物品的数量,价格与质量()。 输出 对于每组数据,输出一个整数代表答案。 思路:由于V范围太大所以不能用常规的背包来解决这个问题,而种数n很小,最大才是3,所以我就想到了用枚举每种物体放多少件的每种情况来求解该问题的答案。 示例输入 1 10 10 1 10原创 2015-08-29 10:39:25 · 400 阅读 · 0 评论