| Problem | prefixsums |
|---|---|
| User | PerihelionfromAphelion |
| Submission Time | 2026-04-29 16:33:24 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
prefixsums.cpp: In function ‘int main()’:
prefixsums.cpp:6:6: error: expected unqualified-id before ‘(’ token
6 | cin.(nullptr);
| ^
prefixsums.cpp:9:21: error: conflicting declaration ‘std::vector<long long int> a’
9 | vector <long long> a(n + 1), prefix(n + 1, 0);
| ^
prefixsums.cpp:7:12: note: previous declaration as ‘int a [1000006]’
7 | int n, q, a[1000006];
| ^
prefixsums.cpp:10:7: error: ‘i’ was not declared in this scope
10 | for (i = 1; i <= n; i++) {
| ^
prefixsums.cpp:13:7: error: ‘i’ was not declared in this scope
13 | for (i = 1; i <= n; i++) {
| ^
prefixsums.cpp:14:3: error: ‘pref’ was not declared in this scope; did you mean ‘prefix’?
14 | pref[i] = pref[i - 1] + a[i];
| ^~~~
| prefix
prefixsums.cpp:18:10: error: ‘pref’ was not declared in this scope; did you mean ‘prefix’?<