![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
背包
文章平均质量分 89
nka_kun
ACMer
展开
-
HDU 2602 Bone Collector (01背包)
Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave …The bone collector had a big bag with a volume of V ,and along his trip of原创 2017-08-16 18:44:47 · 195 阅读 · 0 评论 -
HDU-2844Coins(多重背包)
CoinsProblem DescriptionWhuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch...原创 2018-07-24 17:09:05 · 308 阅读 · 0 评论 -
HDU-1864 最大报销额(01背包)
最大报销额Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。 Input测试输入包含若干测试用例。每个测试用例的第1行包含两个正数 Q ...原创 2018-07-24 15:31:09 · 183 阅读 · 0 评论 -
HDU2159 FATE(二维费用背包)
FATEProblem Description最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或者0以下时,xhd就不会玩这游戏。xhd还说了他最多只...原创 2018-05-07 22:32:24 · 129 阅读 · 0 评论 -
POJ 1276 Cash Machine (多重背包)
Cash MachineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 39126 Accepted: 14224DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate ...原创 2018-05-07 18:24:27 · 123 阅读 · 0 评论 -
qduoj ycb的ACM进阶之路(貌似01的多重背包)
Description ycb是个天资聪颖的孩子,他的梦想是成为世界上最伟大的ACMer。为此,他想拜附近最有威望的dalao为师。dalao为了判断他的资质,给他出了一个难题。dalao把他带到一个到处都是题的oj里对他说:“孩子,这个oj里有一些不同的题,做每一道题都需要一些时间,每一题也有它自身的rp(人品值)。我会给你一段时间,在这段时间里,你可以做一些题。如果你是一个聪明的孩子,你应该...原创 2018-05-07 18:16:21 · 193 阅读 · 0 评论 -
2017蓝桥杯 包子凑数(完全背包)
包子凑数问题描述 小明几乎每天早晨都会在一家包子铺吃早餐。他发现这家包子铺有N种蒸笼,其中第i种蒸笼恰好能放Ai个包子。每种蒸笼都有非常多笼,可以认为是无限笼。 每当有顾客想买X个包子,卖包子的大叔就会迅速选出若干笼包子来,使得这若干笼中恰好一共有X个包子。比如一共有3种蒸笼,分别能放3、4和5个包子。当顾客想买11个包子时,大叔就会选2笼3个的再加1笼5个的(也可能选出1笼3个的再加2笼...原创 2018-03-08 11:54:07 · 728 阅读 · 0 评论 -
POJ 1384 Piggy-Bank(完全背包)
Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple. Whenever some ACM member has any small money, he takes原创 2017-08-18 20:57:28 · 345 阅读 · 0 评论 -
POJ 1276 Cash Machine (多重背包)
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 denominations, say Dk, k=1,N, and for each denomination Dk the machine has a sup原创 2017-08-16 20:09:52 · 317 阅读 · 0 评论 -
hdu1171Big Event in HDU(01背包或多重背包)
Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had ever been split into Computer College and Software College in 2002.The splitting is absolutely a big event in HDU! At the sam原创 2017-08-16 19:53:15 · 290 阅读 · 0 评论 -
HDU-6376 度度熊剪纸条
度度熊剪纸条 Time Limit: 2000/1000 MS (Java/Others)Problem Description度度熊有一张纸条和...原创 2018-08-12 13:08:59 · 301 阅读 · 0 评论