![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
01背包
狠人王
怀着一颗热情的心,追随自己的梦想!
展开
-
POJ 3624Charm Bracelet
题目来源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 the N (1 ≤ N ≤ 3,402) available charms. Eac...原创 2019-04-20 10:56:54 · 88 阅读 · 0 评论 -
HDU2546饭卡(01背包)
电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。**Input**多组数据。对于每组数据:第一行为正整数...原创 2019-04-20 14:56:34 · 150 阅读 · 0 评论