Problem wormholes
User r1r2r3r4
Submission Time 2025-07-02 17:25:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

wormholes.cpp: In function ‘int time(int, int)’:
wormholes.cpp:8:19: error: invalid types ‘int[int]’ for array subscript
8 | else if (out[x] > 0) {
| ^
wormholes.cpp:9:30: error: invalid types ‘int[int]’ for array subscript
9 | return min(time(out[x], out), time(x-1, out))+1;
| ^
wormholes.cpp: In function ‘int main()’:
wormholes.cpp:21:9: error: ‘out’ was not declared in this scope
21 | out[i] = -1;
| ^~~
wormholes.cpp:26:9: error: ‘out’ was not declared in this scope
26 | out[wpos2] = wpos;
| ^~~
wormholes.cpp:29:23: error: ‘out’ was not declared in this scope
29 | cout << time(n-1, out);
| ^~~