King's Path
242C1800· expert2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
5 7 6 1135 3 86 7 115 2 5
Output
4
Sample 2of 3
Input
3 4 3 1033 1 44 5 93 10 10
Output
6
Sample 3of 3
Input
1 1 2 1021 1 32 6 10
Output
-1
58%
242C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…