Problem fenwicktree
User wrizz69
Submission Time 2023-11-10 10:05: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:9:34: error: ‘ft’ was not declared in this scope
9 | for(; e > 0; e-=lsb(e)) sum+=ft[e];
| ^~
fenwicktree.cpp:10:35: error: ‘ft’ was not declared in this scope
10 | for(; s > 0;s-=lsb(s)) sum -= ft[s];
| ^~
fenwicktree.cpp: In function ‘void update(long long int, long long int)’:
fenwicktree.cpp:14:13: error: ‘n’ was not declared in this scope
14 | for(;p<=n+1;p+=lsb(p)) ft[p] +=v;
| ^
fenwicktree.cpp:14:28: error: ‘ft’ was not declared in this scope
14 | for(;p<=n+1;p+=lsb(p)) ft[p] +=v;
| ^~