正文
增加 6 行删除 6 行
48 行未改动4950515253545556575830 行未改动899091929394959697989913 行未改动113114115116117118119120121120 行未改动全部展开48 行未改动#ifdef N2#define _GLIBCXX_DEBUG#define LOG(...) fprintf(stderr, __VA_ARGS__)#define DO(...) __VA_ARGS__#define NDO(...)#else#define LOG(...)#define DO(...)#define NDO(...) __VA_ARGS__#endif30 行未改动for(auto r : p) numy.emplace_back(r.yl), numy.emplace_back(r.yr);sort(numx.begin(), numx.end());sort(numy.begin(), numy.end());for(auto &r : p) {r = Rect(upper_bound(numx.begin(), numx.end(), r.xl) - numx.begin(),upper_bound(numy.begin(), numy.end(), r.yl) - numy.begin(),upper_bound(numx.begin(), numx.end(), r.xr) - numx.begin(),upper_bound(numy.begin(), numy.end(), r.yr) - numy.begin());}for(int i = 0; i < p.size(); i++) {opt.emplace_back(Seg(p[i].xl, p[i].xr, p[i].yl), i);13 行未改动while(x <= n) {tr[x] += val;x += __lowbit(x);}}int __query(int x) {int res = 0;while(x) {res += tr[x];120 行未改动全部展开48 行未改动4950515253545556575830 行未改动899091929394959697989913 行未改动113114115116117118119120121120 行未改动全部展开48 行未改动#ifdef N2#define _GLIBCXX_DEBUG#define LOG(...) fprintf(stderr, __VA_ARGS__)#define DO(...) __VA_ARGS__#define NDO(...)#else#define LOG(...)#define DO(...)#define NDO(...) __VA_ARGS__#endif30 行未改动for(auto r : p) numy.emplace_back(r.yl), numy.emplace_back(r.yr);sort(numx.begin(), numx.end());sort(numy.begin(), numy.end());for(auto &r : p) {r = Rect(upper_bound(numx.begin(), numx.end(), r.xl) - numx.begin(),upper_bound(numy.begin(), numy.end(), r.yl) - numy.begin(),upper_bound(numx.begin(), numx.end(), r.xr) - numx.begin(),upper_bound(numy.begin(), numy.end(), r.yr) - numy.begin());}for(int i = 0; i < p.size(); i++) {opt.emplace_back(Seg(p[i].xl, p[i].xr, p[i].yl), i);13 行未改动while(x <= n) {tr[x] += val;x += __lowbit(x);}}int __query(int x) {int res = 0;while(x) {res += tr[x];120 行未改动全部展开