aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2020-09-06 17:54:27 -0500
committerAnthony Wang2020-09-06 17:54:27 -0500
commit7836b0c0ba58e3b68dd937e042e7c62e687455f7 (patch)
tree38621e1324fc654999b5b81e80939928bf5f7369
parentf79db8f69575229c7bb21c00f7d7ced120d0e187 (diff)
Update segment_tree.cpp
-rw-r--r--Data Structures/segment_tree.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Data Structures/segment_tree.cpp b/Data Structures/segment_tree.cpp
index 1d74f2c..c0f317b 100644
--- a/Data Structures/segment_tree.cpp
+++ b/Data Structures/segment_tree.cpp
@@ -11,7 +11,7 @@ template<typename T> struct seg_tree {
if (l == r) seg[n] = v;
else {
int m = (l+r)>>1;
- build(l, m, n<<1), build(m+1, r, n<<1|1);
+ build(v, l, m, n<<1), build(v, m+1, r, n<<1|1);
seg[n] = pull(seg[n<<1], seg[n<<1|1]);
}
}