From 6087e1adebc9025681c0efbaa59d530472af0d2f Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Tue, 19 Jan 2021 21:44:08 -0600 Subject: Update fenwick_tree.cpp --- Data Structures/fenwick_tree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data Structures/fenwick_tree.cpp b/Data Structures/fenwick_tree.cpp index 4f73507..0ffeb3e 100644 --- a/Data Structures/fenwick_tree.cpp +++ b/Data Structures/fenwick_tree.cpp @@ -1,7 +1,7 @@ template class fenwick_tree { private: int N; T FT[MX]; public: - fenwick_tree(int n) { N = n } + fenwick_tree(int n) { N = n; } fenwick_tree(int n, T A[]) { N = n; memcpy(FT, A, sizeof FT); } void update(int x, T val) { if (++x) for (; x < N; x += x&-x) FT[x] += val; } T query(int x) { T ret = 0; if (++x) for (; x; x -= x&-x) ret += FT[x]; return ret; } -- cgit v1.2.3-70-g09d2