这题莫队,但是我把询问按左右端点递增排个序,吸口氧过了。
属实离谱,这应该卡掉吧。
记录
// 排序函数 bool cmp(node x, node y) { if (x.l != y.l) return x.l < y.l; return x.r < y.r; }