贪心
文章平均质量分 86
JSK670072474
这个作者很懒,什么都没留下…
展开
-
pku2287 Tian Ji-The Horse Racing
贪心策略: 1,如果田忌的最快马快于齐王的最快马,则两者比。 (因为若是田忌的别的马很可能就赢不了了,所以两者比) 2,如果田忌的最快马慢于齐王的最快马,则用田忌的最慢马和齐王的最快马比。 (由于所有的马都赢不了齐王的最快马,所以用损失最小的,拿最慢的和他比) 3,若相等,则比较田忌的最慢马和齐王的最慢马 3.1,若田忌最慢马快于齐王最慢马,两者比。 (田忌的最慢马既然能赢一个就赢呗,而且齐王的最...转载 2018-02-27 21:44:55 · 148 阅读 · 0 评论 -
hdu1009 FatMouse' Trade w
Description FatMouse 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 c...原创 2018-02-28 19:23:25 · 268 阅读 · 0 评论 -
hdu2037 今年暑假不AC
Description “今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%...”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超级女生,以...原创 2018-02-28 19:38:33 · 144 阅读 · 0 评论 -
hdu1051 Wooden Sticks
Description There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. ...原创 2018-02-28 20:40:22 · 146 阅读 · 0 评论 -
hdu1050 Moving Tables
Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and ...原创 2018-03-01 10:50:02 · 122 阅读 · 0 评论 -
poj1042 Gone Fishing
Description John is going on a fishing trip. He has h hours available (1 <= h <= 16), and there are n lakes in the area (2 <= n <= 25) all reachable along a single, one-way ...原创 2018-03-01 22:21:03 · 196 阅读 · 0 评论 -
poj1700 Crossing River
Description A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arrangement must be arranged in order...原创 2018-03-13 16:59:01 · 171 阅读 · 0 评论