Problem stepgame
User Teeskit
Submission Time 2025-08-24 15:06:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

stepgame.cpp: In function ‘int main()’:
stepgame.cpp:8:6: error: conflicting declaration ‘int presum [0]’
8 | int presum[0] = 0;
| ^~~~~~
stepgame.cpp:7:6: note: previous declaration as ‘int presum’
7 | int presum(N+1);
| ^~~~~~
stepgame.cpp:10:11: error: invalid types ‘int[int]’ for array subscript
10 | presum[i] = presum[i-1] + presum[i];
| ^
stepgame.cpp:10:25: error: invalid types ‘int[int]’ for array subscript
10 | presum[i] = presum[i-1] + presum[i];
| ^
stepgame.cpp:10:38: error: invalid types ‘int[int]’ for array subscript
10 | presum[i] = presum[i-1] + presum[i];
| ^
stepgame.cpp:15:16: error: invalid types ‘int[int]’ for array subscript
15 | if (presum[j] - presum[i] < lowest) {
| ^
stepgame.cpp:15:28: error: invalid types ‘int[int]’ for array subscript<