cf/mirror

Shortest Path Queries

CF
938G2900· international gm3.5s512 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5 5
1 2 3
2 3 4
3 4 5
4 5 6
1 5 1
5
3 1 5
1 1 3 1
3 1 5
2 1 5
3 1 5
Output
1
1
2
938G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…