summaryrefslogtreecommitdiff
path: root/datastructures/fenwickTree2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'datastructures/fenwickTree2.cpp')
-rw-r--r--datastructures/fenwickTree2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/datastructures/fenwickTree2.cpp b/datastructures/fenwickTree2.cpp
index ff87e2e..43c3a32 100644
--- a/datastructures/fenwickTree2.cpp
+++ b/datastructures/fenwickTree2.cpp
@@ -14,7 +14,7 @@ void init(vector<ll>& v) {
}
ll prefix_sum (int i) {
- ll res = 0; i++;
+ ll res = 0;
for (int ti = i; ti > 0; ti -= ti&(-ti))
res += add[ti] * i + mul[ti];
return res;