种类并查集
摘要:
#include <iostream>using namespace std;const int M = 50000 + 10;struct Node{ int father; int kind;}node[M];void Init(int n){ for (int i = 1; i <= n; i++) { node[i].father = i; node[i].kind = 0; }}//int Find(int x){ if (x == node[x].father) { return x; } ... 阅读全文
posted @ 2012-08-31 20:10 [S*I]SImMon_WCG______* 阅读(738) 评论(0) 推荐(0) 编辑