cf/mirror

Labyrinth

CF
1578L2400· grandmaster2s1024 MB⌨ stdin/stdout

Examples

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