Problem stepgame
User jwsk0
Submission Time 2025-10-29 20:30:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cc1plus: error: ‘::main’ must return ‘int’
stepgame.cpp: In function ‘int main()’:
stepgame.cpp:17:21: error: invalid operands of types ‘long long int’ and ‘long long int*’ to binary ‘operator-’
17 | minStepR = psum[i]-max_element(psum,psum+i-1);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | long long int*
| long long int
stepgame.cpp:18:3: error: ‘minStep’ was not declared in this scope; did you mean ‘minStepR’?
18 | minStep = min(minStep, minStepR);
| ^~~~~~~
| minStepR
stepgame.cpp:20:8: error: ‘minStep’ was not declared in this scope; did you mean ‘minStepR’?
20 | cout<<minStep;
| ^~~~~~~
| minStepR