Problem dinowalk
User YSH2020
Submission Time 2024-05-16 20:46:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dinowalk.cpp:30:15: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
30 | int out = ans[0];
| ^~~
| abs
dinowalk.cpp:31:5: error: expected unqualified-id before ‘for’
31 | for (int i = 0; i < n; i++) out = min(out, ans[i]);
| ^~~
dinowalk.cpp:31:21: error: ‘i’ does not name a type
31 | for (int i = 0; i < n; i++) out = min(out, ans[i]);
| ^
dinowalk.cpp:31:28: error: ‘i’ does not name a type
31 | for (int i = 0; i < n; i++) out = min(out, ans[i]);
| ^
dinowalk.cpp:32:5: error: ‘cout’ does not name a type; did you mean ‘out’?
32 | cout << out;
| ^~~~
| out
dinowalk.cpp:33:1: error: expected declaration before ‘}’ token
33 | }
| ^