![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
暑假训练题C组
suninisu
这个作者很懒,什么都没留下…
展开
-
UVA - 1149
方法: 贪心,先装大的垃圾。 注意输出格式。 AC代码: #include <cstdio> #include <algorithm> #include <iostream> using namespace std; const int maxn = 100000+100; struct sta { int chance; int bi...原创 2018-08-07 20:00:47 · 110 阅读 · 0 评论 -
HDU - 2037
方法: 优先队列,以结束时间早的为先。 AC代码: #include <iostream> #include <queue> #include <algorithm> using namespace std; struct jiemu { int begg; int endd; bool operator < (const ...原创 2018-08-07 20:01:51 · 244 阅读 · 0 评论 -
HYSBZ - 1734 愤怒的牛
方法: 二分枚举加贪心。 用二分来枚举最小距离的最大值。 贪心来判断此时的最小距离是否可以符合,也就是是否可以放下所有的牛。 AC代码: #include <cstdio> #include <iostream> #include <algorithm> using namespace std; const int maxn = 100000+100...原创 2018-08-07 20:04:47 · 220 阅读 · 0 评论