Problem prefixsums
User Nathaniel
Submission Time 2025-03-28 17:10:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prefixsums.cpp: In function ‘int main()’:
prefixsums.cpp:8:21: error: expected ‘]’ before ‘;’ token
8 | int a[n+1], pre[n+1;
| ^
| ]
prefixsums.cpp:9:2: error: ‘pre’ was not declared in this scope
9 | pre[0]=0;
| ^~~
prefixsums.cpp:14:27: error: expected ‘;’ before ‘)’ token
14 | for (int i = 0; i < q,i++){
| ^
| ;
prefixsums.cpp:21:1: error: expected primary-expression before ‘]’ token
21 | ]
| ^
prefixsums.cpp:21:1: error: expected ‘}’ at end of input
prefixsums.cpp:5:12: note: to match this ‘{’
5 | int main() {
| ^