cf/mirror

Minimum spanning tree for each edge

CF
609E2100· master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5 7
1 2 3
1 3 1
1 4 5
2 3 2
2 5 3
3 4 2
4 5 4
Output
9
8
11
8
8
8
9
609E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…