F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39524148_21388.cpp:2:13: error: expected primary-expression before '=' token
    2 | #define MaxN=2000006;
      |             ^
0_0_39524148_21388.cpp:5:9: note: in expansion of macro 'MaxN'
    5 | int ans[MaxN],N[MaxN];
      |         ^~~~
0_0_39524148_21388.cpp:2:21: error: expected ']' before ';' token
    2 | #define MaxN=2000006;
      |                     ^
0_0_39524148_21388.cpp:5:9: note: in expansion of macro 'MaxN'
    5 | int ans[MaxN],N[MaxN];
      |         ^~~~
0_0_39524148_21388.cpp:5:13: error: expected unqualified-id before ']' token
    5 | int ans[MaxN],N[MaxN];
      |             ^
0_0_39524148_21388.cpp:5:21: error: expected unqualified-id before ']' token
    5 | int ans[MaxN],N[MaxN];
      |                     ^
0_0_39524148_21388.cpp:2:13: error: expected primary-expression before '=' token
    2 | #define MaxN=2000006;
      |             ^
0_0_39524148_21388.cpp:6:25: note: in expansion of macro 'MaxN'
    6 | int edgenum,NIL=-1,head[MaxN],nex[2*MaxN],vet[2*MaxN],net[2*MaxN];
      |                         ^~~~
0_0_39524148_21388.cpp:2:21: error: expected ']' before ';' token
    2 | #define MaxN=2000006;
      |                     ^
0_0_39524148_21388.cpp:6:25: note: in expansion of macro 'MaxN'
    6 | int edgenum,NIL=-1,head[MaxN],nex[2*MaxN],vet[2*MaxN],net[2*MaxN];
      |                         ^~~~
0_0_39524148_21388.cpp:6:29: error: expected unqualified-id before ']' token
    6 | int edgenum,NIL=-1,head[MaxN],nex[2*MaxN],vet[2*MaxN],net[2*MaxN];
      |                             ^
0_0_39524148_21388.cpp:6:41: error: expected unqualified-id before ']' token
    6 | int edgenum,NIL=-1,head[MaxN],nex[2*MaxN],vet[2*MaxN],net[2*MaxN];
      |                                         ^
0_0_39524148_21388.cpp:6:53: error: expected unqualified-id before ']' token
    6 | int edgenum,NIL=-1,head[MaxN],nex[2*MaxN],vet[2*MaxN],net[2*MaxN];
      |                                                     ^
0_0_39524148_21388.cpp:6:65: error: expected unqualified-id before ']' token
    6 | int edgenum,NIL=-1,head[MaxN],nex[2*MaxN],vet[2*MaxN],net[2*MaxN];
      |                                                                 ^
0_0_39524148_21388.cpp:2:13: error: expected primary-expression before '=' token
    2 | #define MaxN=2000006;
      |             ^
0_0_39524148_21388.cpp:7:7: note: in expansion of macro 'MaxN'
    7 | int f[MaxN],H[MaxN],fid[MaxN];
      |       ^~~~
0_0_39524148_21388.cpp:2:21: error: expected ']' before ';' token
    2 | #define MaxN=2000006;
      |                     ^
0_0_39524148_21388.cpp:7:7: note: in expansion of macro 'MaxN'
    7 | int f[MaxN],H[MaxN],fid[MaxN];
      |       ^~~~
0_0_39524148_21388.cpp:7:11: error: expected unqualified-id before ']' token
    7 | int f[MaxN],H[MaxN],fid[MaxN];
      |           ^
0_0_39524148_21388.cpp:7:19: error: expected unqualified-id before ']' token
    7 | int f[MaxN],H[MaxN],fid[MaxN];
      |                   ^
0_0_39524148_21388.cpp:7:29: error: expected unqualified-id before ']' token
    7 | int f[MaxN],H[MaxN],fid[MaxN];
      |                             ^
0_0_39524148_21388.cpp: In function 'void addedge(int, int, int)':
0_0_39524148_21388.cpp:10:5: error: 'nex' was not declared in this scope
   10 |     nex[edgenum]=head[u];
      |     ^~~
0_0_39524148_21388.cpp:10:18: error: 'head' was not declared in this scope
   10 |     nex[edgenum]=head[u];
      |                  ^~~~
0_0_39524148_21388.cpp:11:5: error: 'vet' was not declared in this scope
   11 |     vet[edgenum]=v;
      |     ^~~
0_0_39524148_21388.cpp:12:5: error: 'net' was not declared in this scope
   12 |     net[edgenum]=w;
      |     ^~~
0_0_39524148_21388.cpp: In function 'void init(int, int)':
0_0_39524148_21388.cpp:23:5: error: 'f' was not declared in this scope
   23 |     f[u]=fu;
      |     ^
0_0_39524148_21388.cpp:24:5: error: 'H' was not declared in this scope
   24 |     H[u]=H[fu]+1;
      |     ^
0_0_39524148_21388.cpp:25:15: error: 'head' was not declared in this scope
   25 |     for(int i=head[u];i!=NIL;i=nex[i]){
      |               ^~~~
0_0_39524148_21388.cpp:25:32: error: 'nex' was not declared in this scope
   25 |     for(int i=head[u];i!=NIL;i=nex[i]){
      |                                ^~~
0_0_39524148_21388.cpp:26:15: error: 'vet' was not declared in this scope
   26 |         int v=vet[i],x=net[i];
      |               ^~~
0_0_39524148_21388.cpp:28:9: error: 'fid' was not declared in this scope
   28 |         fid[v]=x;
      |         ^~~
0_0_39524148_21388.cpp: In function 'int find(int)':
0_0_39524148_21388.cpp:33:11: error: 'N' was not declared in this scope
   33 |     if(x!=N[x]) N[x]=find(N[x]);
      |           ^
0_0_39524148_21388.cpp:34:12: error: 'N' was not declared in this scope
   34 |     return N[x];
      |            ^
0_0_39524148_21388.cpp: In function 'void Union(int, int)':
0_0_39524148_21388.cpp:38:5: error: 'N' was not declared in this scope
   38 |     N[fx]=fy;
      |     ^
0_0_39524148_21388.cpp: In function 'void work(int, int, int)':
0_0_39524148_21388.cpp:44:16: error: 'H' was not declared in this scope
   44 |         int hx=H[x],hy=H[y];
      |                ^
0_0_39524148_21388.cpp:46:16: error: 'hy' was not declared in this scope; did you mean 'hx'?
   46 |         if(hx>=hy){
      |                ^~
      |                hx
0_0_39524148_21388.cpp:47:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   47 |             if(ans[fid[x]]==0)
      |                ^~~
      |                abs
0_0_39524148_21388.cpp:47:20: error: 'fid' was not declared in this scope; did you mean 'find'?
   47 |             if(ans[fid[x]]==0)
      |                    ^~~
      |                    find
0_0_39524148_21388.cpp:49:21: error: 'f' was not declared in this scope
   49 |             Union(x,f[x]);
      |                     ^
0_0_39524148_21388.cpp:52:12: error: 'hy' was not declared in this scope; did you mean 'hx'?
   52 |         if(hy>hx){
      |            ^~
      |            hx
0_0_39524148_21388.cpp:53:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   53 |             if(ans[fid[y]]==0)
      |                ^~~
      |                abs
0_0_39524148_21388.cpp:53:20: error: 'fid' was not declared in this scope; did you mean 'find'?
   53 |             if(ans[fid[y]]==0)
      |                    ^~~
      |                    find
0_0_39524148_21388.cpp:55:21: error: 'f' was not declared in this scope
   55 |             Union(y,f[y]);
      |                     ^
0_0_39524148_21388.cpp: In function 'int main()':
0_0_39524148_21388.cpp:66:13: error: 'head' was not declared in this scope
   66 |             head[i]=NIL;
      |             ^~~~
0_0_39524148_21388.cpp:67:13: error: 'N' was not declared in this scope
   67 |             N[i]=i;
      |             ^
0_0_39524148_21388.cpp:70:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   70 |             ans[i]=0;
      |             ^~~
      |             abs
0_0_39524148_21388.cpp:82:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
   82 |             printf("%d ",ans[i]);
      |                          ^~~
      |                          abs


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-09-20 14:39:23, Gzip enabled