注意有可能是你在 pushdown 区间赋 0 的时候,把
t[ls].ans=t[ls].len; t[rs].ans=t[rs].len; // len 是区间长度,ans 是区间的答案
写成了
t[ls].ans=t[ls].len; t[rs].ans=t[rs].ans;