![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
背包
文章平均质量分 77
IF_I
这个作者很懒,什么都没留下…
展开
-
Cash Machine(POJ--1276 【多重背包】
DescriptionA 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 · 212 阅读 · 0 评论 -
Balance(POJ--1837
DescriptionGigel 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 · 310 阅读 · 0 评论 -
钱币兑换问题(完全背包问题)
H - 钱币兑换问题Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。原创 2015-02-14 23:12:35 · 551 阅读 · 0 评论 -
寒冰王座(完全背包问题)
F - 寒冰王座Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买原创 2015-02-14 22:51:08 · 469 阅读 · 0 评论 -
饭卡
B - 饭卡Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可原创 2015-02-14 22:44:04 · 298 阅读 · 0 评论 -
Bone Collector
A - Bone CollectorTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionMany years ago , in Teddy’s hometown there was a m原创 2015-02-14 22:24:10 · 299 阅读 · 0 评论 -
一维的01背包问题
2015年寒假集训第一次周赛的一道题:点击打开链接。 #includeint 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 · 892 阅读 · 0 评论 -
CRB and His Birthday(HDUOJ--5410
Problem DescriptionToday 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 · 463 阅读 · 0 评论 -
来发背包开开胃(OJ--3303
题目描述多组输入。对于每组输入:(1 )接下来的n行,每行三个整数Si,Pi,Mi,分别代表第i种物品的数量,价格与质量()。输出对于每组数据,输出一个整数代表答案。思路:由于V范围太大所以不能用常规的背包来解决这个问题,而种数n很小,最大才是3,所以我就想到了用枚举每种物体放多少件的每种情况来求解该问题的答案。示例输入1 1010 1 10原创 2015-08-29 10:39:25 · 332 阅读 · 0 评论