hdu3047带权并查集
hdu3047题解:带权并查集裸题#include <bits/stdc++.h>using namespace std;int const N = 50000 + 10;int n,m,a,b,x,f[N],val[N];int find(int x){ if(x != f[x]){ int t = f[x]; f[x] = find(f[x]); v...