King's Task
1510K1200· pupil3s512 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
36 3 2 5 4 1
Output
3
Sample 2of 3
Input
23 4 2 1
Output
-1
Sample 3of 3
Input
41 2 3 4 5 6 7 8
Output
0
58%
1510K.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…