From 7836b0c0ba58e3b68dd937e042e7c62e687455f7 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Sun, 6 Sep 2020 17:54:27 -0500 Subject: Update segment_tree.cpp --- Data Structures/segment_tree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 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]); } } -- cgit v1.2.3-70-g09d2