BZOJ2527 [Poi2011]Meteors
全局二分+树状数组,其实还是比较水。 比较坑的一点是直接求和会暴long long。如果≥Pi了要直接break掉。好坑啊。 #include <cstdio> #include <cctype> #include <cstring> #include <algorithm> using namespace std; int _d_; #define readInt(_x_) { \ int& _s_ = (_x_ = 0); \ while (!isdigit(_d_ = getchar())); \ while (_s_ = (_s_ << 3) + (_s_ << 1) + _d_ - 48, isdigit(_d_ = getchar())); \ } typedef long long dint; const int maxn = 300009; struct node { int v; node *next; }; struct rain { int l, r, a; }; struct bintree { dint t[maxn]; int n; bintree() {...