#include <stdio.h> #include <stdlib.h>#define MAX 100/* 定义边(x,y),权为w */ typedef struct {int x, y;int w; }edge;edge e[MAX]; /* rank[x]表示x的秩 */ int rank[MAX]; /* father[x]……