King's Path
1211G2500· grandmaster5s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
172 3 2 7 1 1 37 1 2 3 1 2 31 74 12 62 32 45 4
Output
Yes41 4 2 6
Sample 2of 3
Input
151 2 2 2 22 2 2 2 11 22 33 44 5
Output
Yes51 2 3 4 5
Sample 3of 3
Input
3410 20 10 2020 10 20 101 21 31 421000000 10000001000000 10000001 2104 2 2 4 2 4 1 2 3 44 2 4 4 3 2 1 2 4 25 86 910 51 107 103 45 93 102 4
Output
NoYes0Yes53 10 5 9 6
58%
1211G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…