
01背包
文章平均质量分 81
ghvn7777
这个作者很懒,什么都没留下…
展开
-
hdu2191 悼念512汶川大地震遇难同胞——珍惜现在,感恩生活 01背包
Problem Description急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?后记:人生是一个充满了变数的生命过程,天灾、人祸、病痛是我们生命历程中不可预知的威胁。月有阴晴原创 2014-12-21 21:56:28 · 538 阅读 · 0 评论 -
3466Proud Merchants(需消除后效性的01背包)
Problem DescriptionRecently, iSea went to an ancient country. For such a long time, it was the most wealthy and powerful kingdom in the world. As a result, the people in this country are still ver原创 2014-12-21 20:04:45 · 620 阅读 · 0 评论 -
hdu2546饭卡(动规 01背包)
Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。原创 2014-12-19 00:37:18 · 500 阅读 · 0 评论 -
hdu1864最大报销额度(01背包)- 把小数化整数技巧
Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。 Input测试输入包含若干测试用例。每个测试用例的第1行包原创 2014-12-19 21:11:54 · 563 阅读 · 0 评论 -
hdu4502临时工计划(01背包)
Problem Description 俗话说一分钱难倒英雄汉,高中几年下来,吉哥已经深深明白了这个道理,因此,新年开始存储一年的个人资金已经成了习惯,不过自从大学之后他不好意思再向大人要压岁钱了,只能把唯一的希望放到自己身上。可是由于时间段的特殊性和自己能力的因素,只能找到些零零碎碎的工作,吉哥想知道怎么安排自己的假期才能获得最多的工资。 已知吉哥一共有m天的假期,每天的编号从1原创 2014-12-19 15:29:49 · 502 阅读 · 0 评论 -
hdu1203 I need a offer 01背包
Problem DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了原创 2014-12-19 21:48:25 · 492 阅读 · 0 评论 -
2639骨头问题2(01背包的第k大值)
Problem DescriptionThe title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" competition,you must have seem this title.If you haven't seen it before,it doesn't m转载 2014-12-20 21:27:18 · 716 阅读 · 0 评论 -
hdu1171 Big Event in HDU 01背包
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 Softw原创 2014-12-20 23:44:25 · 490 阅读 · 0 评论 -
hdu2955 小偷 01背包 简单变形
Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided t原创 2014-12-21 15:38:28 · 620 阅读 · 0 评论 -
poj2576二维01背包
Description A tug of war is to be arranged at the local office picnic. For the tug of war, the picnickers must be divided into two teams. Each person must be on one team or the other; the number of pe原创 2015-07-26 22:36:32 · 467 阅读 · 0 评论