0_0_34192670_778.cpp: In function 'int findSet(int)':
0_0_34192670_778.cpp:16:11: error: 'parent' was not declared in this scope
if (x == parent[x])
^
0_0_34192670_778.cpp:20:32: error: 'FindSet' was not declared in this scope
parent[x] = FindSet(parent[x]); //父节点变为根节点,此时value[x]=父节点到根节点的权值
^
0_0_34192670_778.cpp:21:3: error: 'value' was not declared in this scope
value[x] += value[t]; //当前节点的权值加上原本父节点的权值
^
0_0_34192670_778.cpp:25:2: error: expected ';' before '}' token
}
^
0_0_34192670_778.cpp: In function 'int main()':
0_0_34192670_778.cpp:36:23: error: 'findset' was not declared in this scope
int aroot=findset(a);
^
|