POJ 1679 The Unique MST (Kruskal 判最小生成树是否唯一)

The first line contains a single integer t (1 <= t <= 20), the number of test cases. Each case represents a graph. It begins with a line containing two integers n and m (1 <= n <= 100), the number of nodes and edges. Each of the following m lines contains a triple (xi, yi, wi), indicating that xi and yi are connected by an edge with weight = wi. For any two nodes, there is at most one edge connecting them.

,夫妇一条心,泥土变黄金。

POJ 1679 The Unique MST (Kruskal 判最小生成树是否唯一)

相关文章:

你感兴趣的文章:

标签云: