aboutsummaryrefslogtreecommitdiff
path: root/Data Structures
diff options
context:
space:
mode:
authorTa180m2020-05-01 14:50:01 -0500
committerTa180m2020-05-01 14:50:01 -0500
commit7dd7c5a1656e59fa0bf14fe4b06a89307ca2bdf7 (patch)
treef34e669a42e8e9f2b740610f7461c243492242fb /Data Structures
parent125f34046c5b131b7fed3ee0a0190c33a3072020 (diff)
Update segment_tree_v3.cpp
Diffstat (limited to 'Data Structures')
-rw-r--r--Data Structures/segment_tree_v3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Data Structures/segment_tree_v3.cpp b/Data Structures/segment_tree_v3.cpp
index 6308b9a..774bb7e 100644
--- a/Data Structures/segment_tree_v3.cpp
+++ b/Data Structures/segment_tree_v3.cpp
@@ -1,4 +1,4 @@
-int seg[400004], tmp[400004];
+int seg[400004] = { 0 }, tmp[400004] = { 0 };
inline int pull(const int& l, const int& r) { return l + r; }
inline void push(int l, int r, int n) {
seg[n] += (r - l + 1) * tmp[n];