0_0_17764161_4854.cpp:5:7: error: 'N' does not name a type
const N=100005;
^
0_0_17764161_4854.cpp:6:8: error: 'N' was not declared in this scope
int mp[N];
^
0_0_17764161_4854.cpp:7:7: error: 'N' was not declared in this scope
int r[N];
^
0_0_17764161_4854.cpp: In function 'void init()':
0_0_17764161_4854.cpp:11:19: error: 'N' was not declared in this scope
for(int i=1;i<=N;i++) r[i]=i;
^
0_0_17764161_4854.cpp:11:26: error: 'r' was not declared in this scope
for(int i=1;i<=N;i++) r[i]=i;
^
0_0_17764161_4854.cpp:12:11: error: 'mp' was not declared in this scope
memset(mp,0,sizeof(mp));
^
0_0_17764161_4854.cpp: In function 'int find(int)':
0_0_17764161_4854.cpp:17:11: error: 'r' was not declared in this scope
while(x!=r[x])
^
0_0_17764161_4854.cpp:23:9: error: 'r' was not declared in this scope
int j=r[u];
^
0_0_17764161_4854.cpp: In function 'void merge(int, int)':
0_0_17764161_4854.cpp:34:3: error: 'r' was not declared in this scope
r[r1]=r2;
^
0_0_17764161_4854.cpp: In function 'int main()':
0_0_17764161_4854.cpp:53:10: error: 'mp' was not declared in this scope
if(mp[i]&&r[i]==i) cnt++;
^
0_0_17764161_4854.cpp:53:17: error: 'r' was not declared in this scope
if(mp[i]&&r[i]==i) cnt++;
^
0_0_17764161_4854.cpp:63:3: error: 'mp' was not declared in this scope
mp[a]=1;mp[b]=1;
^
|