0_0_17348499_2922.cpp:1:7: error: 'MAXN' was not declared in this scope
int p[MAXN],num[MAXN];
^
0_0_17348499_2922.cpp:1:17: error: 'MAXN' was not declared in this scope
int p[MAXN],num[MAXN];
^
0_0_17348499_2922.cpp: In function 'int main()':
0_0_17348499_2922.cpp:7:26: error: 'scanf' was not declared in this scope
while (scanf("%d",&n)!=EOF)
^
0_0_17348499_2922.cpp:7:29: error: 'EOF' was not declared in this scope
while (scanf("%d",&n)!=EOF)
^
0_0_17348499_2922.cpp:10:21: error: 'MAXN' was not declared in this scope
for (i=0;i<MAXN;i++)
^
0_0_17348499_2922.cpp:12:14: error: 'p' was not declared in this scope
p[i]=i;
^
0_0_17348499_2922.cpp:13:14: error: 'num' was not declared in this scope
num[i]=1;
^
0_0_17348499_2922.cpp:20:24: error: 'p' was not declared in this scope
while (a!=p[a]) a=p[a];
^
0_0_17348499_2922.cpp:21:24: error: 'p' was not declared in this scope
while (b!=p[b]) b=p[b];
^
0_0_17348499_2922.cpp:24:21: error: 'num' was not declared in this scope
if (num[a]>=num[b])
^
0_0_17348499_2922.cpp:26:20: error: 'p' was not declared in this scope
p[b]=a;
^
0_0_17348499_2922.cpp:32:21: error: 'p' was not declared in this scope
p[a]=b;
^
0_0_17348499_2922.cpp:37:27: error: 'printf' was not declared in this scope
printf("%d\n",max);
^
|