Problem stepgame
User jwsk0
Submission Time 2025-10-29 20:30:04
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:16:3: error: ‘minStepR’ was not declared in this scope
16 | minStepR = psum[i]-max_element(psum,psum+i-1);
| ^~~~~~~~
stepgame.cpp:16:21: error: invalid operands of types ‘long long int’ and ‘long long int*’ to binary ‘operator-’
16 | minStepR = psum[i]-max_element(psum,psum+i-1);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | long long int*
| long long int
stepgame.cpp:17:3: error: ‘minStep’ was not declared in this scope
17 | minStep = min(minStep, minStepR);
| ^~~~~~~
stepgame.cpp:19:8: error: ‘minStep’ was not declared in this scope
19 | cout<<minStep;
| ^~~~~~~