cf/mirror

Sheriff's Defense

CF
2014F2000· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
3 1
2 3 1
1 2
2 3
3 1
3 6 3
1 2
2 3
3 1
-2 -3 -1
1 2
2 3
6 1
5 -4 3 6 7 3
4 1
5 1
3 5
3 6
1 2
8 1
3 5 2 7 8 5 -3 -4
7 3
1 8
4 3
3 5
7 6
8 7
2 1
Output
3
8
0
17
26
2014F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…