
背包问题
三更鬼
这个作者很懒,什么都没留下…
展开
-
Piggy-Bank||HDU1114
Link:http://acm.hdu.edu.cn/showproblem.php?pid=1114 Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this acti原创 2017-08-08 20:31:31 · 223 阅读 · 0 评论 -
51nod 1085 背包问题
link:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1085在N件物品取出若干件放在容量为W的背包里,每件物品的体积为W1,W2……Wn(Wi为整数),与之相对应的价值为P1,P2……Pn(Pi为整数)。求背包能够容纳的最大价值。Input第1行,2个整数,N和W中间用空格隔开。N为物品的数量,W为背包的容量。(1原创 2017-08-10 10:40:27 · 213 阅读 · 0 评论 -
Robberies||HDU2955
link:http://acm.hdu.edu.cn/showproblem.php?pid=2955 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原创 2017-08-10 18:26:49 · 236 阅读 · 0 评论 -
饭卡||HDU2546
link:http://acm.hdu.edu.cn/showproblem.php?pid=2546 Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每原创 2017-08-10 20:47:43 · 348 阅读 · 0 评论