
背包
SCUT_Pein
这个作者很懒,什么都没留下…
展开
-
POJ1837--Balance
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原创 2013-03-06 18:57:47 · 905 阅读 · 0 评论 -
POJ1014--多重背包--Dividing
DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the marbles h原创 2013-03-27 18:40:06 · 861 阅读 · 0 评论 -
HDU1171--Big Event in HDU
Problem DescriptionNowadays, 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 Softwar原创 2013-04-06 11:22:56 · 754 阅读 · 0 评论 -
POJ2063--Investment
DescriptionJohn never knew he had a grand-uncle, until he received the notary's letter. He learned that his late grand-uncle had gathered a lot of money, somewhere in South-America, and that John wa原创 2013-03-22 19:24:29 · 712 阅读 · 0 评论 -
HDU2191
Problem Description急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?后记:人生是一个充满了变数的生命过程,天灾、人祸、病痛是我们生命历程中不可预知的威胁。月有阴晴圆缺原创 2013-04-06 12:46:17 · 771 阅读 · 0 评论 -
HDU1114--Piggy-Bank
Problem DescriptionBefore 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原创 2013-04-06 14:04:08 · 646 阅读 · 0 评论 -
HDU2159--FATE
Problem Description最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或者0以下时,xhd就不会玩这游戏。xhd还说了他最多只杀s原创 2013-04-05 23:31:27 · 947 阅读 · 0 评论 -
HDU1203--I NEED A OFFER!--0-1
Problem DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得原创 2013-04-05 22:49:42 · 972 阅读 · 0 评论 -
POJ3624--Charm Bracelet--0-1背包
DescriptionBessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible from theN (1 ≤ N ≤ 3,402) available charms. Ea原创 2013-03-22 08:31:28 · 710 阅读 · 0 评论 -
HDOJ2602--0-1背包Bone Collector
Problem DescriptionMany 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 grav原创 2013-04-05 02:02:01 · 853 阅读 · 0 评论 -
HDU1864--DP+深搜
Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。 Input测试输入包含若干测试用例。每个测试用例的第1行包含两原创 2013-04-04 23:49:16 · 922 阅读 · 0 评论 -
HDOJ3732--Ahui Writes Word--多重背包
Problem DescriptionWe all know that English is very important, so Ahui strive for this in order to learn more English words. To know that word has its value and complexity of writing (the length of原创 2013-03-17 15:56:00 · 1016 阅读 · 0 评论 -
POJ1276-Cash Machine .
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1299341477 提示:动态规划,多重背包 题目大意:有各种不同面值的货币,每种面值的货币有不同的数量,请找出利用这些货币可以凑成的最接近且小于等于给定的数字cash的金额。 初始思路:多重背包问题,第i种面额d[i]有 n[i]+1种选择方案可以转载 2013-03-12 21:16:42 · 635 阅读 · 0 评论 -
饭卡--01背包
DescriptionXX大学本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。Input D原创 2013-03-11 18:32:35 · 885 阅读 · 0 评论 -
POJ1742--Coins
DescriptionPeople 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 some coins.He decided to buy a very nice wat原创 2013-03-27 17:48:10 · 979 阅读 · 0 评论