Problem prefixsums
User yongteckrice
Submission Time 2023-02-14 08:27:18
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prefixsums.cpp: In function ‘int main()’:
prefixsums.cpp:19:27: error: invalid types ‘long int[long int]’ for array subscript
19 | prefix[i] = temp + N[i-1];
| ^
prefixsums.cpp:26:3: error: ‘answer’ was not declared in this scope; did you mean ‘answers’?
26 | answer[i] = prefix[p2] - prefix[p1-1];
| ^~~~~~
| answers
prefixsums.cpp:29:15: error: ‘answer’ was not declared in this scope; did you mean ‘answers’?
29 | for (auto i: answer)
| ^~~~~~
| answers