随笔分类 -  贪心

AtCoder Beginner Contest 144:E.Gluttony【题解】
摘要:题目链接:https://atcoder.jp/contests/abc144/tasks/abc144_e 一道很简单的二分加贪心,但我在比赛时没过。因为我输入错了,它竟然加上样例还有6个点是对的,于是我查了半小时都没发现这件事,到最后只能怀疑是自己想法错了放弃。 首先二分答案sum。 现在的问题 阅读全文
posted @ 2019-10-28 13:36 nhc2014 阅读(394) 评论(0) 推荐(0)
BZOJ 1634: [Usaco2007 Jan]Protecting the Flowers
摘要:题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1634 解:大力贪心。。。 每次取d/t最大的那个。 程序: 阅读全文
posted @ 2017-04-03 00:55 nhc2014 阅读(178) 评论(0) 推荐(0)