Shortest Paths
2214E1s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
2 11 2 1
Output
1
Sample 2of 3
Input
5 51 2 71 3 41 4 92 3 63 4 2
Output
746-1
Sample 3of 3
Input
5 61 5 22 1 63 4 24 2 95 3 72 3 4
Output
69122
58%
2214E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…