cf/mirror

MinOr Tree

CF
1624G1900· candidate master2s256 MB⌨ stdin/stdout

Examples

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