0_0_16273270_7846.cpp:8:12: error: 'maxn' was not declared in this scope
int parent[maxn],sign[maxn],f;
^
0_0_16273270_7846.cpp:8:23: error: 'maxn' was not declared in this scope
int parent[maxn],sign[maxn],f;
^
0_0_16273270_7846.cpp: In function 'void init(int)':
0_0_16273270_7846.cpp:13:3: error: 'parent' was not declared in this scope
parent[i]=i;
^
0_0_16273270_7846.cpp:14:3: error: 'sign' was not declared in this scope
sign[i]=0;
^
0_0_16273270_7846.cpp: In function 'int find(int)':
0_0_16273270_7846.cpp:19:5: error: 'parent' was not declared in this scope
if(parent[x]==x) return x;
^
0_0_16273270_7846.cpp:20:9: error: 'parent' was not declared in this scope
return parent[x]=find(parent[x]);
^
0_0_16273270_7846.cpp: In function 'void unite(int, int)':
0_0_16273270_7846.cpp:26:11: error: 'parent' was not declared in this scope
if(x!=y) parent[x]=y;
^
0_0_16273270_7846.cpp: In function 'int main()':
0_0_16273270_7846.cpp:34:3: error: 'sign' was not declared in this scope
sign[n]=sign[m]=1;
^
0_0_16273270_7846.cpp:43:17: error: 'maxn' was not declared in this scope
for(int i=1;i<maxn;i++){
^
0_0_16273270_7846.cpp:44:16: error: 'parent' was not declared in this scope
if(sign[i]&&parent[i]==i) k++;//k为根节点数目
^
|