线段树技巧:处理负数端点值 违规用户名4M^ns%fl · 2023-01-07 23:32:29 · 个人记录 在我的博客上看 如果线段树端点值可以取负数,那么应该用 mid = \left[ \frac{l+r-1}{2} \right] 计算中点 e.g. 如果 l=-2, r=-1