Problem prefixsums
User Chris
Submission Time 2024-11-15 09:59:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prefixsums.cpp: In function ‘int32_t main()’:
prefixsums.cpp:11:14: error: expected ‘;’ before ‘long’
11 | cin >> n >> q
| ^
| ;
12 | long long arr[n+1], pre[n+1];
| ~~~~
prefixsums.cpp:13:1: error: ‘pre’ was not declared in this scope
13 | pre[0] = 0;
| ^~~
prefixsums.cpp:14:25: error: ‘arr’ was not declared in this scope
14 | for (int i = 1; i <= n; arr[i]{
| ^~~
prefixsums.cpp:14:31: error: expected ‘)’ before ‘{’ token
14 | for (int i = 1; i <= n; arr[i]{
| ~ ^
| )