Problem fenwicktree_easy
User YH
Submission Time 2026-01-23 17:50:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fenwicktree_easy.cpp:9:8: error: ‘vector’ does not name a type
9 | ll n; vector<ll> fw, arr;
| ^~~~~~
fenwicktree_easy.cpp: In member function ‘ll FWT::query(ll)’:
fenwicktree_easy.cpp:15:11: error: ‘fw’ was not declared in this scope
15 | ans += fw[idx];
| ^~
fenwicktree_easy.cpp: In member function ‘void FWT::update(ll, ll)’:
fenwicktree_easy.cpp:26:4: error: ‘fw’ was not declared in this scope
26 | fw[idx] += delta;
| ^~
fenwicktree_easy.cpp: In constructor ‘FWT::FWT(ll)’:
fenwicktree_easy.cpp:33:3: error: ‘fw’ was not declared in this scope
33 | fw.resize(n+1, 0LL);
| ^~
fenwicktree_easy.cpp:34:3: error: ‘arr’ was not declared in this scope
34 | arr.resize(n+1, 0LL);
| ^~~
fenwicktree_easy.cpp: In member function ‘void FWT::build()’:
fenwicktree_easy.cpp:39:11: error: ‘arr’ was not declared in this scope
39 | cin >> arr[i];