BZOJ3888 [Usaco2015 Jan]Stampede
<div class="post_brief"><p> usaco的银组都开始考这种题了么。其实还是挺水的,不过题号比较好。</p> 就按y排序,挨个把时间轴上的东西扔掉就完了。写离散可能还没有直接写smt快呢。 然后线段有一边要减1有点坑。 #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; typedef long long dint; #define _l (long long int) struct cow { int y; int ta, tb; }; struct node { int l, r, w; node ls, rs; }; typedef pair <node, node > npr; const int maxn = 50009; inline bool operator <(const cow& a, const cow& b) { return a....