Ink on paper(最小生成树
(Kruskal)#include<bits/stdc++.h>using namespace std;//#define int long long#define ll long longconst int N=5e3+10;int fa[N],tot=0,Tot=0;int find(int x){ if(fa[x]==x) return x; else return fa[x]=find(fa[x]);}void Union(int x,int y