摘要:
#include#include#define N 100010int father[N],link[N];int find(int x) {if(x!=father[x]) {int h=father[x];father[x]=find(father[x]);link[x]=(link[x]+li... 阅读全文
摘要:
不会写果断看答案http://cavenkaka.iteye.com/blog/1489588#include#include#define N 50010int father[N],link[N];int find(int x) {if(x!=father[x]) {int h=father[x]... 阅读全文