Problem | prefixsums |
---|---|
User | aiden |
Submission Time | 2025-03-29 17:25:39 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
prefixsums.cpp:7:1: error: expected initializer before ‘long’
7 | long long sum;
| ^~~~
prefixsums.cpp: In function ‘long long int prefixsum(long long int, long long int)’:
prefixsums.cpp:10:9: error: ‘p’ was not declared in this scope
10 | return p[l-1]-p[r];
| ^
prefixsums.cpp: In function ‘int main()’:
prefixsums.cpp:20:3: error: ‘p’ was not declared in this scope
20 | p[i] = p[i-1]+a[i];
| ^
prefixsums.cpp:23:3: error: ‘sum’ was not declared in this scope; did you mean ‘summ’?
23 | sum = 0;
| ^~~
| summ