Problem | prefixsums |
---|---|
User | YongXin |
Submission Time | 2023-06-02 16:34:08 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
prefixsums.cpp: In function ‘int main()’:
prefixsums.cpp:7:7: error: ‘i’ was not declared in this scope
7 | for (i=0;i<n;++i) cin>>a[i];
| ^
prefixsums.cpp:8:7: error: ‘i’ was not declared in this scope
8 | for (i=1;i<n;++i) a[i]+=a[i-1];
| ^
prefixsums.cpp:9:7: error: ‘i’ was not declared in this scope
9 | for (i=1;i<q;++i){
| ^
prefixsums.cpp:11:22: error: expected ‘;’ before ‘}’ token
11 | cout<<a[r-1]-a[l-2]
| ^
| ;
12 | }
| ~