TsH_GD @ 2022-11-19 07:35:12
线段树求调
by xingke233 @ 2022-11-19 08:05:02
@God_Dream
应该return -INF
int check(int p,int l,int r){
if(tr[p].l>r||tr[p].r<l) return -INF;
if(tr[p].l>=l&&tr[p].r<=r){
return tr[p].maxx;
}
push_down(p);
int s=-INF;
s=max(s,check(p<<1,l,r));
s=max(s,check(p<<1|1,l,r));
return s;
}