Dijkstra?
20C1900· candidate master1s64 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
5 61 2 22 5 52 3 41 4 14 3 33 5 1
Output
1 4 3 5
Sample 2of 2
Input
5 61 2 22 5 52 3 41 4 14 3 33 5 1
Output
1 4 3 5
58%
20C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…