if(l==lc[i]&&r==rc[i]){ tag[i]+=(r-l+1)*x; sgt[i]+=tag[i]; return; }
if(tag[i]){ sgt[i]+=tag[i];
那你为啥加两遍,