#Lutece1249. 图切割
图切割
Migrated from Lutece 1249 图切割
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
给你一个个点条边的无向图,删掉每条边有一个花费,求把这个图分成超过一个连通块的最小花费。
Input
一组数据,第一行是和(, ),表示图的点数和边数。
接下来的行表示图中的所有边,以u v w
的形式给出, 表示从到有一条边,删掉这条边的花费是,保证 (, )。
Output
输出一个数,表示拆分这个图的最小花费。
Samples
2 1
1 2 102
102
5 5
1 2 5
2 4 6
1 3 7
3 4 3
5 1 10
8
Resources
咦。。