diff options
-rw-r--r-- | Data Structures/segment_tree.cpp | 2 |
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]); } } |