贪心
神探特斯拉
这个作者很懒,什么都没留下…
展开
-
Vijos P1097 合并果子(优先队列 贪心)
描述在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆。多多决定把所有的果子合成一堆。 每一次合并,多多可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和。可以看出,所有的果子经过n-1次合并之后,就只剩下一堆了。多多在合并果子时总共消耗的体力等于每次合并所耗体力之和。 因为还要花大力气把这些果子搬回家,所以多多在合并果子时要尽可能地节省体力。假原创 2016-01-18 19:52:55 · 1052 阅读 · 0 评论 -
POJ -3253 Fence Repair
Fence RepairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 35076 Accepted: 11332DescriptionFarmer John wants to repair a small length of the fence arou原创 2016-01-18 19:58:11 · 407 阅读 · 0 评论 -
HDOJ 1009 FatMouse' TradeD
Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room con原创 2016-03-08 22:40:24 · 243 阅读 · 0 评论 -
UVA 1149 bin packing (贪心)
A set of n 1-dimensional items have to be packed in identical bins. All bins have exactly the same length l and each item i has length lieach bin contains at most 2 items, each item is packed in原创 2016-07-17 16:20:08 · 798 阅读 · 0 评论 -
UVa 10954 Add All(贪心)
Yup!! The problem name reflects your task; just add a set of numbers. But you may feel yourselves condescended, to write a C/C++ program just to add a set of numbers. Such a problem will simply questi原创 2016-07-03 21:55:56 · 611 阅读 · 0 评论