cf/mirror

Toss a Coin to Your Graph...

CF
1679D1900· candidate master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
6 7 4
1 10 2 3 4 5
1 2
1 3
3 4
4 5
5 6
6 2
2 5
Output
4
Sample 2of 4
Input
6 7 100
1 10 2 3 4 5
1 2
1 3
3 4
4 5
5 6
6 2
2 5
Output
10
Sample 3of 4
Input
2 1 5
1 1
1 2
Output
-1
Sample 4of 4
Input
1 0 1
1000000000
Output
1000000000
1679D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…