Problem fenwicktree
User wrizz69
Submission Time 2023-11-10 11:35:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fenwicktree.cpp: In function ‘long long int query(long long int, long long int)’:
fenwicktree.cpp:8:43: error: ‘ft’ was not declared in this scope
8 | for (; y > 0; y -= lsb(y)) sum += ft[y];
| ^~
fenwicktree.cpp:9:43: error: ‘ft’ was not declared in this scope
9 | for (; x > 0; x -= lsb(x)) sum -= ft[x];
| ^~
fenwicktree.cpp: In function ‘void update(long long int, long long int)’:
fenwicktree.cpp:13:21: error: ‘n’ was not declared in this scope
13 | for (; p <= n + 1; p += lsb(p)) ft[p] += v;
| ^
fenwicktree.cpp:13:41: error: ‘ft’ was not declared in this scope
13 | for (; p <= n + 1; p += lsb(p)) ft[p] += v;
| ^~
fenwicktree.cpp: In function ‘int32_t main()’:
fenwicktree.cpp:33:16: error: expected ‘;’ before ‘}’ toke