Problem fenwicktree
User Runjia
Submission Time 2025-03-15 10:37:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fenwicktree.cpp:1:2: error: invalid preprocessing directive #includ; did you mean #include?
1 | #includ<bits/stdc++.h>
| ^~~~~~
| include
fenwicktree.cpp:3:1: error: ‘map’ does not name a type
3 | map<int,int>ft;
| ^~~
fenwicktree.cpp: In function ‘int query(int)’:
fenwicktree.cpp:6:37: error: ‘ft’ was not declared in this scope
6 | for(; p; p -= (p & -p)) sum += ft[p];
| ^~
fenwicktree.cpp: In function ‘void update(int, int)’:
fenwicktree.cpp:10:14: error: ‘n’ was not declared in this scope
10 | for(; p <= n; p += (p & -p)) ft[p] += v;
| ^
fenwicktree.cpp:10:32: error: ‘ft’ was not declared in this scope
10 | for(; p <= n; p += (p & -p)) ft[p] += v;
| ^~
fenwicktree.cpp: In function ‘int main()’:
fenwicktree.cpp:13:9: error: ‘cin’ was not declared in this scope
1