0_0_23626655_22743.cpp:29:7: error: 'N' was not declared in this scope
int f[N],sum[N];
^
0_0_23626655_22743.cpp:29:14: error: 'N' was not declared in this scope
int f[N],sum[N];
^
0_0_23626655_22743.cpp: In function 'int find(int)':
0_0_23626655_22743.cpp:31:8: error: 'f' was not declared in this scope
if(x==f[x])return x;
^
0_0_23626655_22743.cpp:32:9: error: 'f' was not declared in this scope
return f[x]=find(f[x]);
^
0_0_23626655_22743.cpp: In function 'int Union(int, int)':
0_0_23626655_22743.cpp:39:15: error: 'f' was not declared in this scope
int temp; if(f[fx]>f[fy])temp=fx,fx=fy,fy=temp;
^
0_0_23626655_22743.cpp:41:2: error: 'f' was not declared in this scope
f[fy]=fx;
^
0_0_23626655_22743.cpp:43:7: error: 'sum' was not declared in this scope
temp=sum[fx]*sum[fy];
^
0_0_23626655_22743.cpp: In function 'void init()':
0_0_23626655_22743.cpp:50:23: error: 'sum' was not declared in this scope
for(int i=0;i<=n;i++)sum[i]=1,f[i]=i;
^
0_0_23626655_22743.cpp:50:32: error: 'f' was not declared in this scope
for(int i=0;i<=n;i++)sum[i]=1,f[i]=i;
^
|