背包问题
无
我不是手机
这个作者很懒,什么都没留下…
展开
-
分组背包 T
TAfter months of hard working, Iserlohn finally wins awesome amount of scholarship. As a great zealot of sneakers, he decides to spend all his money on them in a sneaker store.There are several brands of sneakers that Iserlohn wants to collect, such as A原创 2020-07-11 23:26:24 · 79 阅读 · 0 评论 -
分组背包 S
SACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from different course depending on the days he spend on it.How to arrange the M days for the N courses to maximize the profit?InputThe input原创 2020-07-11 23:17:52 · 88 阅读 · 0 评论 -
分组背包 R
RHappy New Term!As having become a junior, xiaoA recognizes that there is not much time for her to AC problems, because there are some other things for her to do, which makes her nearly mad.What’s more, her boss tells her that for some sets of duties, s原创 2020-07-11 23:16:01 · 94 阅读 · 0 评论 -
多重背包 Q
QWhuacmers 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 in a nearby shop. He wanted to pay the exact price(without change) and he known th原创 2020-07-11 23:11:27 · 114 阅读 · 0 评论 -
多重背包 P
**P **急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?后记:人生是一个充满了变数的生命过程,天灾、人祸、病痛是我们生命历程中不可预知的威胁。月有阴晴圆缺,人有旦夕祸福,未来对于我们而言是一个未知数。那么,我们要做的就应该是珍惜现在,感恩生活——感谢父母,他们给予我们生命,抚养我们成人;感谢老师,他们授原创 2020-07-10 20:32:33 · 74 阅读 · 0 评论 -
多重背包 O
OMarsha 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 had the same value, because then they could just split the collectio原创 2020-07-10 20:20:31 · 123 阅读 · 0 评论 -
完全背包 N
N不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前.死亡骑士:“我要买道具!”地精商人:“我们这里有三种道具,血瓶150块一个,魔法药200块一个,无敌药水350块一个.”死亡骑士:“好的,给我一个血瓶.”说完他掏出那张N元的大钞递给地精商人.地精商人:“我忘了提醒你了,我们这里没有找客人钱的习惯的,多的钱我们都当小费收了的,嘿嘿.”死亡骑士:"…"死亡骑士想,与其把钱当小费送个他还不如自原创 2020-07-10 20:13:57 · 85 阅读 · 0 评论 -
完全背包 M
MBefore 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 tak原创 2020-07-10 20:11:09 · 73 阅读 · 0 评论 -
完全背包 L
L最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或者0以下时,xhd就不会玩这游戏。xhd还说了他最多只杀s只怪。请问他能升掉这最后一级吗?Input输入数据有多组,对于每组数据第一行输入n,m,k,s(0 < n,m,k,s < 100)四原创 2020-07-10 20:05:30 · 75 阅读 · 0 评论 -
01背包 K
K电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。Input多组数据。对于每组数据:第一行为正整数n,表示菜的数量。n<=1000。第二行包括n个正整数,表示每种菜的价格。价格不超过50。第三行包括一个正整数原创 2020-07-09 20:34:00 · 71 阅读 · 0 评论 -
01背包 J
JRecently, 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 very proud even if their nation hasn’t been so wealthy any more.The merchants w原创 2020-07-09 20:30:03 · 84 阅读 · 0 评论 -
01背包 I
IMany 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 o原创 2020-07-09 20:28:18 · 70 阅读 · 0 评论 -
01背包 G
GSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得到这个学校offer的可能性b。不同学校之间是否得到offer不会互相影响。“I NEED A OFFER”,他大叫一声。帮帮这个可怜的人吧,帮助他计原创 2020-07-09 19:29:22 · 106 阅读 · 0 评论 -
01背包 H
H“Fat and docile, big and dumb, they look so stupid, they aren’t muchfun…”Cows with Guns by Dana LyonsThe cows want to prove to the public that they are both smart and fun. In order to do this, Bessie has organized an exhibition that will be put on b原创 2020-07-09 20:25:43 · 87 阅读 · 0 评论 -
01背包 F
FNowadays, 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 s原创 2020-07-09 19:24:27 · 85 阅读 · 0 评论