diff options
author | Anthony Wang | 2020-07-25 20:47:00 -0500 |
---|---|---|
committer | Anthony Wang | 2020-07-25 20:47:00 -0500 |
commit | 82bb88cb7f4f44327639d1c1b64c49e75e7b81eb (patch) | |
tree | 9f25c505ad117d2edfadfd8bbdb0d6b234ceb37c | |
parent | 97007357aa51e2884e1f23b13654e5aad885aa8d (diff) |
Update segment_tree.cpp
-rw-r--r-- | Data Structures/segment_tree.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Data Structures/segment_tree.cpp b/Data Structures/segment_tree.cpp index 56f0da9..dfe0b5d 100644 --- a/Data Structures/segment_tree.cpp +++ b/Data Structures/segment_tree.cpp @@ -1,5 +1,5 @@ -int seg[400004] = { 0 }, tmp[400004] = { 0 }; -inline int pull(const int& a, const int& b) { return a + b; } +int seg[400004], tmp[400004]; +inline int pull(const int & a, const int & b) { return a + b; } inline void push(int l, int r, int n) { seg[n] += (r - l + 1) * tmp[n]; if (l != r) tmp[n << 1] += tmp[n], tmp[n << 1 | 1] += tmp[n]; |