0_0_19741346_3651.cpp:1:8: error: 'N' was not declared in this scope
int fa[N], Rank[N];//Rank数组表示集合的秩
^
0_0_19741346_3651.cpp:1:17: error: 'N' was not declared in this scope
int fa[N], Rank[N];//Rank数组表示集合的秩
^
0_0_19741346_3651.cpp: In function 'void init(int)':
0_0_19741346_3651.cpp:6:9: error: 'fa' was not declared in this scope
fa[i] = i;
^
0_0_19741346_3651.cpp:7:9: error: 'Rank' was not declared in this scope
Rank[i] = 1;
^
0_0_19741346_3651.cpp: In function 'int find(int)':
0_0_19741346_3651.cpp:12:17: error: 'fa' was not declared in this scope
return x == fa[x] ? x : fa[x] = find(fa[x]);
^
0_0_19741346_3651.cpp: In function 'void unio(int, int)':
0_0_19741346_3651.cpp:19:9: error: 'Rank' was not declared in this scope
if (Rank[y1] < Rank[y2])
^
0_0_19741346_3651.cpp:21:9: error: 'fa' was not declared in this scope
fa[y1] = y2;
^
0_0_19741346_3651.cpp:26:9: error: 'fa' was not declared in this scope
fa[y2] = y1;
^
|