POJ 1611 The Suspects (并查集)
题目链接:http://poj.org/problem?id=1611
函数:void Empty()、int Find(int x)、void Union(int r1,int r2) 这三个函数,要背熟。
# include
using namespace std;
int n, m, i, j;
int father[30005], num[30005];
void make
原创
2013-09-18 00:00:00 ·
828 阅读 ·
0 评论