summaryrefslogtreecommitdiff
path: root/datastructures/lazyPropagation2.cpp
diff options
context:
space:
mode:
authorMZuenni <michi.zuendorf@gmail.com>2023-02-16 15:15:31 +0100
committerMZuenni <michi.zuendorf@gmail.com>2023-02-16 15:15:31 +0100
commitd7f7e36275b344c70a15b3d7479739abff8de864 (patch)
tree0a149b26dd83e39708bdc4db0ffcb845fae265ce /datastructures/lazyPropagation2.cpp
parentda3552d151fff109f85316ce6eaa3b503662078a (diff)
changed comment
Diffstat (limited to 'datastructures/lazyPropagation2.cpp')
-rw-r--r--datastructures/lazyPropagation2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/datastructures/lazyPropagation2.cpp b/datastructures/lazyPropagation2.cpp
index 6529102..b44b362 100644
--- a/datastructures/lazyPropagation2.cpp
+++ b/datastructures/lazyPropagation2.cpp
@@ -25,7 +25,7 @@ void push(int p) {
d[i] = updateFlag;
}}}
-void update(int l, int r, ll value) { // assign value
+void update(int l, int r, ll value) { // data[l..r)=value
if (value == updateFlag) return;
l += sz(tree)/2, r += sz(tree)/2;
push(l);
@@ -39,7 +39,7 @@ void update(int l, int r, ll value) { // assign value
build(r0 - 1);
}
-ll query(int l, int r) { // sum(l..r)
+ll query(int l, int r) { // sum[l..r)
l += sz(tree)/2, r += sz(tree)/2;
push(l);
push(r - 1);