摘要:
线段树,维护每个区间的maxy,查找时用二分。/*Accepted 3627 1203MS 6848K 2698 B C++*/#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int MAXN = 200010;struct TPoint{ int x, y, flag;}pre[MAXN], ans[MAXN], s;char op[10];int n, m;struct Segtree{ int l, r, maxy;}tree[MAXN < 阅读全文