以此图为例: package com.datastruct; import java.util.Scanner; public class TestKruskal { private static class Edge{ public Edge(int begin,int end,int weight){ this.begin = begin; this.end = end; this.weight = weight; } int begin; int end; int weight; publ…
poj 1251 Jungle Roads (最小生成树) Link: http://poj.org/problem?id=1251 Jungle Roads Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 23507 Accepted: 11012 Description The Head Elder of the tropical island of Lagrishan has a problem. A b…