Update segment_tree_v2.cpp
This commit is contained in:
parent
c034778615
commit
fbe807c036
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ public:
|
|||
}
|
||||
T query(int a, int b, int l = 0, int r = -1, int n = 1) {
|
||||
if (r == -1) r = N - 1;
|
||||
if (l > b || r < a) return 0;
|
||||
if (a > b || l > b || r < a) return 0;
|
||||
push(l, r, n);
|
||||
if (l >= a && r <= b) return seg[n];
|
||||
int m = (l + r) >> 1;
|
||||
|
|
Loading…
Reference in a new issue