Problem wabbit
User louisleehi
Submission Time 2024-02-18 12:57:36
Score 0
Max Time N/A
Max Memory N/A

Compile Error

wabbit.cpp:5:13: error: two or more data types in declaration of ‘m’
5 | int m[300005], d[300005], p[300005];
| ^
wabbit.cpp:5:24: error: two or more data types in declaration of ‘d’
5 | int m[300005], d[300005], p[300005];
| ^
wabbit.cpp:5:35: error: two or more data types in declaration of ‘p’
5 | int m[300005], d[300005], p[300005];
| ^
wabbit.cpp: In function ‘void calculate(int)’:
wabbit.cpp:8:5: error: ‘p’ was not declared in this scope
8 | p[0] = 0;
| ^
wabbit.cpp:10:25: error: ‘m’ was not declared in this scope
10 | p[i] = p[i-1] + m[i-1];
| ^
wabbit.cpp: In function ‘int getSum(int, int)’:
wabbit.cpp:14:12: error: ‘p’ was not declared in this scope
14 | return p[b+1] - p[a];
| ^
wabbit.cpp: In function ‘int main()’:
wabbit.cpp:21:16: er