cf/mirror

Leha and another game about graph

CF
840B2100· master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
1 0
1
Output
-1
Sample 2of 4
Input
4 5
0 0 0 -1
1 2
2 3
3 4
1 4
2 4
Output
0
Sample 3of 4
Input
2 1
1 1
1 2
Output
1
1
Sample 4of 4
Input
3 3
0 -1 1
1 2
2 3
1 3
Output
1
2
840B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…