摘要:
很神奇的线段树#include#include#include#include#include#includeusing namespace std;#define maxn 400000int n;struct P{ int l,r,v,num; }a[maxn];struct NODE{ int l,r,maxx,e,ma;}tree[maxn*2];int xx[maxn];void down(int x){ int y=xtree[z].maxx)tree[x].maxx=tree[y].maxx,tree[x].ma=tree[y].ma; else tree[x].max... 阅读全文