摘要:
简单并查集View Code #include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>using namespace std;#define maxn 30005int n, m;int father[maxn];int stk[maxn];void init(){ for (int i = 0; i < n; i++) father[i] = i;}int getanc(int a){ int top = 0; while (father[a] != 阅读全文
posted @ 2013-04-16 18:41
undefined2024
阅读(320)
评论(0)
推荐(1)

浙公网安备 33010602011771号