diff options
Diffstat (limited to 'Data Structures/fenwick_tree.cpp')
-rw-r--r-- | Data Structures/fenwick_tree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<typename T> 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; } |