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_26241019_12988.cpp:3:10: error: 'M' was not declared in this scope
 int head[M],f[M],son[M],sz[M],id[M],rnk[M],dep[M],top[M];
          ^
0_0_26241019_12988.cpp:3:15: error: 'M' was not declared in this scope
 int head[M],f[M],son[M],sz[M],id[M],rnk[M],dep[M],top[M];
               ^
0_0_26241019_12988.cpp:3:22: error: 'M' was not declared in this scope
 int head[M],f[M],son[M],sz[M],id[M],rnk[M],dep[M],top[M];
                      ^
0_0_26241019_12988.cpp:3:28: error: 'M' was not declared in this scope
 int head[M],f[M],son[M],sz[M],id[M],rnk[M],dep[M],top[M];
                            ^
0_0_26241019_12988.cpp:3:34: error: 'M' was not declared in this scope
 int head[M],f[M],son[M],sz[M],id[M],rnk[M],dep[M],top[M];
                                  ^
0_0_26241019_12988.cpp:3:41: error: 'M' was not declared in this scope
 int head[M],f[M],son[M],sz[M],id[M],rnk[M],dep[M],top[M];
                                         ^
0_0_26241019_12988.cpp:3:48: error: 'M' was not declared in this scope
 int head[M],f[M],son[M],sz[M],id[M],rnk[M],dep[M],top[M];
                                                ^
0_0_26241019_12988.cpp:3:55: error: 'M' was not declared in this scope
 int head[M],f[M],son[M],sz[M],id[M],rnk[M],dep[M],top[M];
                                                       ^
0_0_26241019_12988.cpp:4:21: error: 'M' was not declared in this scope
 int tot,cnt,n,m,q,a[M],pos,ans;
                     ^
0_0_26241019_12988.cpp:8:4: error: 'M' was not declared in this scope
 }e[M<<1];
    ^
0_0_26241019_12988.cpp:12:7: error: 'M' was not declared in this scope
 }tree[M<<2];
       ^
0_0_26241019_12988.cpp: In function 'void init()':
0_0_26241019_12988.cpp:16:9: error: 'head' was not declared in this scope
  memset(head,-1,sizeof(head));
         ^
0_0_26241019_12988.cpp:16:29: error: 'memset' was not declared in this scope
  memset(head,-1,sizeof(head));
                             ^
0_0_26241019_12988.cpp: In function 'void add(int, int)':
0_0_26241019_12988.cpp:20:2: error: 'e' was not declared in this scope
  e[++cnt].v=v;
  ^
0_0_26241019_12988.cpp:21:14: error: 'head' was not declared in this scope
  e[cnt].next=head[u];
              ^
0_0_26241019_12988.cpp: In function 'void dfs(int, int, int)':
0_0_26241019_12988.cpp:26:2: error: 'sz' was not declared in this scope
  sz[u]=1,son[u]=-1,f[u]=fa,dep[u]=d; 
  ^
0_0_26241019_12988.cpp:26:10: error: 'son' was not declared in this scope
  sz[u]=1,son[u]=-1,f[u]=fa,dep[u]=d; 
          ^
0_0_26241019_12988.cpp:26:20: error: 'f' was not declared in this scope
  sz[u]=1,son[u]=-1,f[u]=fa,dep[u]=d; 
                    ^
0_0_26241019_12988.cpp:26:28: error: 'dep' was not declared in this scope
  sz[u]=1,son[u]=-1,f[u]=fa,dep[u]=d; 
                            ^
0_0_26241019_12988.cpp:27:12: error: 'head' was not declared in this scope
  for(int i=head[u];~i;i=e[i].next)
            ^
0_0_26241019_12988.cpp:27:25: error: 'e' was not declared in this scope
  for(int i=head[u];~i;i=e[i].next)
                         ^
0_0_26241019_12988.cpp: In function 'void dfs1(int, int)':
0_0_26241019_12988.cpp:40:2: error: 'id' was not declared in this scope
  id[u]=++tot;
  ^
0_0_26241019_12988.cpp:41:2: error: 'rnk' was not declared in this scope
  rnk[tot]=u;
  ^
0_0_26241019_12988.cpp:42:2: error: 'top' was not declared in this scope
  top[u]=t;
  ^
0_0_26241019_12988.cpp:43:5: error: 'son' was not declared in this scope
  if(son[u]==-1)
     ^
0_0_26241019_12988.cpp:45:7: error: 'son' was not declared in this scope
  dfs1(son[u],t);
       ^
0_0_26241019_12988.cpp:46:12: error: 'head' was not declared in this scope
  for(int i=head[u];~i;i=e[i].next)
            ^
0_0_26241019_12988.cpp:46:25: error: 'e' was not declared in this scope
  for(int i=head[u];~i;i=e[i].next)
                         ^
0_0_26241019_12988.cpp:49:9: error: 'fa' was not declared in this scope
   if(v==fa)
         ^
0_0_26241019_12988.cpp: In function 'void pushup(int)':
0_0_26241019_12988.cpp:56:6: error: expected unqualified-id before '[' token
  tree[rt].sum=tree[rt<<1].sum+tree[rt<<1|1].sum; 
      ^
0_0_26241019_12988.cpp: In function 'void pushdown(int)':
0_0_26241019_12988.cpp:60:9: error: expected primary-expression before '[' token
  if(tree[rt].lazy)
         ^
0_0_26241019_12988.cpp:62:13: error: expected primary-expression before '[' token
   int v=tree[rt].lazy;
             ^
0_0_26241019_12988.cpp:63:7: error: expected unqualified-id before '[' token
   tree[rt].lazy=0;
       ^
0_0_26241019_12988.cpp:64:7: error: expected unqualified-id before '[' token
   tree[rt<<1].lazy+=v;
       ^
0_0_26241019_12988.cpp:65:7: error: expected unqualified-id before '[' token
   tree[rt<<1|1].lazy+=v;
       ^
0_0_26241019_12988.cpp:66:7: error: expected unqualified-id before '[' token
   tree[rt<<1].sum+=v*(tree[rt<<1].r-tree[rt<<1].l+1); 
       ^
0_0_26241019_12988.cpp:67:7: error: expected unqualified-id before '[' token
   tree[rt<<1|1].sum+=v*(tree[rt<<1|1].r-tree[rt<<1|1].l+1);
       ^
0_0_26241019_12988.cpp: In function 'void build(int, int, int)':
0_0_26241019_12988.cpp:72:6: error: expected unqualified-id before '[' token
  tree[rt].l=l,tree[rt].r=r,tree[rt].lazy=0;
      ^
0_0_26241019_12988.cpp:75:7: error: expected unqualified-id before '[' token
   tree[rt].sum=rnk[l];
       ^
0_0_26241019_12988.cpp: In function 'void update(int, int, int, int, int, int)':
0_0_26241019_12988.cpp:87:7: error: expected unqualified-id before '[' token
   tree[rt].lazy+=v;
       ^
0_0_26241019_12988.cpp:88:7: error: expected unqualified-id before '[' token
   tree[rt].sum+=v*(r-l+1);
       ^
0_0_26241019_12988.cpp:94:25: error: too few arguments to function 'void update(int, int, int, int, int, int)'
   update(L,R,l,mid,rt<<1);
                         ^
0_0_26241019_12988.cpp:83:6: note: declared here
 void update(int L,int R,int l,int r,int rt,int v)
      ^
0_0_26241019_12988.cpp:96:29: error: too few arguments to function 'void update(int, int, int, int, int, int)'
   update(L,R,mid+1,r,rt<<1|1);
                             ^
0_0_26241019_12988.cpp:83:6: note: declared here
 void update(int L,int R,int l,int r,int rt,int v)
      ^
0_0_26241019_12988.cpp: In function 'void query(int, int, int)':
0_0_26241019_12988.cpp:103:11: error: expected primary-expression before '[' token
   ans=tree[rt].sum;
           ^
0_0_26241019_12988.cpp: In function 'void updates(int, int, int)':
0_0_26241019_12988.cpp:116:9: error: 'top' was not declared in this scope
  int fx=top[x],fy=top[y];
         ^
0_0_26241019_12988.cpp:117:12: error: 'fy' was not declared in this scope
  while(fx!=fy)
            ^
0_0_26241019_12988.cpp:119:6: error: 'dep' was not declared in this scope
   if(dep[fx]>dep[fy])
      ^
0_0_26241019_12988.cpp:121:11: error: 'id' was not declared in this scope
    update(id[fx],id[x],1,n,1,v);
           ^
0_0_26241019_12988.cpp:122:6: error: 'f' was not declared in this scope
    x=f[fx],fx=top[x];
      ^
0_0_26241019_12988.cpp:126:11: error: 'id' was not declared in this scope
    update(id[fy],id[y],1,n,1,v);
           ^
0_0_26241019_12988.cpp:127:6: error: 'f' was not declared in this scope
    y=f[fy],fy=top[y];
      ^
0_0_26241019_12988.cpp:130:5: error: 'dep' was not declared in this scope
  if(dep[x]<dep[y])
     ^
0_0_26241019_12988.cpp:131:16: error: 'id' was not declared in this scope
         update(id[x],id[y],1,n,1,v);
                ^
0_0_26241019_12988.cpp:133:16: error: 'id' was not declared in this scope
         update(id[y],id[x],1,n,1,v);
                ^
0_0_26241019_12988.cpp: In function 'int main()':
0_0_26241019_12988.cpp:139:43: error: 'a' was not declared in this scope
         for(int i=1;i<=n;i++) scanf("%d",&a[i]);
                                           ^
0_0_26241019_12988.cpp:158:37: error: 'id' was not declared in this scope
                 scanf("%d",&c1);pos=id[c1];query(1,n,1);
                                     ^


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-10-06 21:26:45, Gzip enabled