Problem prefixsums
User angelahaha
Submission Time 2023-11-09 14:37:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prefixsums.cpp: In function ‘int main()’:
prefixsums.cpp:8:17: error: expected ‘;’ before ‘int’
8 | cin >> query
| ^
| ;
9 |
10 | int precompute () {
| ~~~
prefixsums.cpp:13:28: error: a function-definition is not allowed here before ‘{’ token
13 | int query(int s, int e){
| ^
prefixsums.cpp: At global scope:
prefixsums.cpp:18:17: error: expected constructor, destructor, or type conversion before ‘(’ token
18 | precomputed (i) = precomputed (i-1) + A (i)
| ^
prefixsums.cpp:20:1: error: expected declaration before ‘}’ token
20 | }
| ^