import java.util.Arrays;
import java.util.Scanner;
public class 最小生成树kruskal {
private static Edge[] map;
private static int[] father;
private static int ans = 0; //权值的和
static class Edge implements Comparable<Edge>{
int x;
int y;
int cost;
public Edge(int x, int y, int cost) {
super();
this.x = x;
this.y = y;
import java.util.Scanner;
public class 最小生成树kruskal {
private static Edge[] map;
private static int[] father;
private static int ans = 0; //权值的和
static class Edge implements Comparable<Edge>{
int x;
int y;
int cost;
public Edge(int x, int y, int cost) {
super();
this.x = x;
this.y = y;