Shortest Path Problem?
845G2300· international master3s512 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
3 31 2 31 3 23 2 0
Output
2
Sample 2of 2
Input
2 21 1 31 2 3
Output
0
58%
845G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…