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

Compile Error

fenwicktree.cpp:3:13: error: expected initializer before ‘long’
3 | #define int long long
| ^~~~
fenwicktree.cpp:7:1: note: in expansion of macro ‘int’
7 | int query(int x, int y) {
| ^~~
fenwicktree.cpp: In function ‘void update(long long int, long long int)’:
fenwicktree.cpp:14:21: error: ‘n’ was not declared in this scope
14 | for (; p <= n + 1; p += lsb(p)) ft[p] += v;
| ^
fenwicktree.cpp:14:41: error: ‘ft’ was not declared in this scope
14 | for (; p <= n + 1; p += lsb(p)) ft[p] += v;
| ^~
fenwicktree.cpp: In function ‘int32_t main()’:
fenwicktree.cpp:30:12: error: ‘query’ was not declared in this scope
30 | cout << query(x, y+1) << "\n";
| ^~~~~
fenwicktree.cpp:34:16: error: expected ‘;’ before ‘}’ token
34 | update(x, z)
| ^