Problem fenwicktree
User Daddy
Submission Time 2023-11-06 20:18:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fenwicktree.cpp: In function ‘int main()’:
fenwicktree.cpp:7:5: error: ‘vector’ was not declared in this scope
7 | vector<int> a(n);
| ^~~~~~
fenwicktree.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 | using namespace std;
fenwicktree.cpp:7:12: error: expected primary-expression before ‘int’
7 | vector<int> a(n);
| ^~~
fenwicktree.cpp:10:16: error: ‘a’ was not declared in this scope
10 | cin >> a[i];
| ^
fenwicktree.cpp:24:24: error: ‘a’ was not declared in this scope
24 | sum += a[i];
| ^
fenwicktree.cpp:32:17: error: ‘a’ was not declared in this scope
32 | a[i] += z;
| ^