0_0_20158645_59.cpp:5:4: error: 'N' was not declared in this scope
}e[N];
^
0_0_20158645_59.cpp:6:10: error: 'N' was not declared in this scope
int head[N],gs;
^
0_0_20158645_59.cpp:7:9: error: 'N' was not declared in this scope
int son[N],size[N],top[N],w[N],fa[N],dep[N],cntw,n,m,p;
^
0_0_20158645_59.cpp:7:17: error: 'N' was not declared in this scope
int son[N],size[N],top[N],w[N],fa[N],dep[N],cntw,n,m,p;
^
0_0_20158645_59.cpp:7:24: error: 'N' was not declared in this scope
int son[N],size[N],top[N],w[N],fa[N],dep[N],cntw,n,m,p;
^
0_0_20158645_59.cpp:7:29: error: 'N' was not declared in this scope
int son[N],size[N],top[N],w[N],fa[N],dep[N],cntw,n,m,p;
^
0_0_20158645_59.cpp:7:35: error: 'N' was not declared in this scope
int son[N],size[N],top[N],w[N],fa[N],dep[N],cntw,n,m,p;
^
0_0_20158645_59.cpp:7:42: error: 'N' was not declared in this scope
int son[N],size[N],top[N],w[N],fa[N],dep[N],cntw,n,m,p;
^
0_0_20158645_59.cpp:8:8: error: 'N' was not declared in this scope
int tr[N],v[N];
^
0_0_20158645_59.cpp:8:13: error: 'N' was not declared in this scope
int tr[N],v[N];
^
0_0_20158645_59.cpp: In function 'void add(int, int)':
0_0_20158645_59.cpp:12:7: error: 'e' was not declared in this scope
gs++;e[gs].next=head[fr];e[gs].to=to;head[fr]=gs;
^
0_0_20158645_59.cpp:12:18: error: 'head' was not declared in this scope
gs++;e[gs].next=head[fr];e[gs].to=to;head[fr]=gs;
^
0_0_20158645_59.cpp: In function 'void add1(int, int)':
0_0_20158645_59.cpp:24:4: error: 'tr' was not declared in this scope
tr[k]+=x;
^
0_0_20158645_59.cpp: In function 'int sum1(int)':
0_0_20158645_59.cpp:35:9: error: 'tr' was not declared in this scope
tot+=tr[x];
^
0_0_20158645_59.cpp: In function 'void dfs1(int, int)':
0_0_20158645_59.cpp:43:2: error: 'dep' was not declared in this scope
dep[u]=dep[fat]+1;size[u]=1;fa[u]=fat;
^
0_0_20158645_59.cpp:43:20: error: 'size' was not declared in this scope
dep[u]=dep[fat]+1;size[u]=1;fa[u]=fat;
^
0_0_20158645_59.cpp:43:30: error: 'fa' was not declared in this scope
dep[u]=dep[fat]+1;size[u]=1;fa[u]=fat;
^
0_0_20158645_59.cpp:45:12: error: 'head' was not declared in this scope
for(int i=head[u];i;i=e[i].next)
^
0_0_20158645_59.cpp:45:24: error: 'e' was not declared in this scope
for(int i=head[u];i;i=e[i].next)
^
0_0_20158645_59.cpp:54:8: error: 'son' was not declared in this scope
son[u]=v;
^
0_0_20158645_59.cpp: In function 'void dfs2(int, int)':
0_0_20158645_59.cpp:63:2: error: 'w' was not declared in this scope
w[u]=++cntw;top[u]=tp;
^
0_0_20158645_59.cpp:63:14: error: 'top' was not declared in this scope
w[u]=++cntw;top[u]=tp;
^
0_0_20158645_59.cpp:64:12: error: 'v' was not declared in this scope
add1(cntw,v[u]);add1(cntw+1,-v[u]);
^
0_0_20158645_59.cpp:65:5: error: 'son' was not declared in this scope
if(son[u]) dfs2(son[u],tp);
^
0_0_20158645_59.cpp:67:12: error: 'head' was not declared in this scope
for(int i=head[u];i;i=e[i].next)
^
0_0_20158645_59.cpp:67:24: error: 'e' was not declared in this scope
for(int i=head[u];i;i=e[i].next)
^
0_0_20158645_59.cpp:70:10: error: 'fa' was not declared in this scope
if(v!=fa[u]&&v!=son[u])
^
0_0_20158645_59.cpp:70:20: error: 'son' was not declared in this scope
if(v!=fa[u]&&v!=son[u])
^
0_0_20158645_59.cpp: In function 'void lca(int, int, int)':
0_0_20158645_59.cpp:86:9: error: 'top' was not declared in this scope
int f1=top[x],f2=top[y];
^
0_0_20158645_59.cpp:87:12: error: 'f2' was not declared in this scope
while(f1!=f2)
^
0_0_20158645_59.cpp:89:7: error: 'dep' was not declared in this scope
if(dep[f1]<dep[f2]) swap(f1,f2),swap(x,y);
^
0_0_20158645_59.cpp:90:11: error: 'fa' was not declared in this scope
int rr=fa[f1];
^
0_0_20158645_59.cpp:91:11: error: 'w' was not declared in this scope
change(w[rr],w[x],delt);x=rr;
^
0_0_20158645_59.cpp:96:7: error: 'dep' was not declared in this scope
if(dep[x]>dep[y]) swap(x,y);
^
0_0_20158645_59.cpp:97:11: error: 'w' was not declared in this scope
change(w[x],w[y],delt);
^
0_0_20158645_59.cpp: In function 'int main()':
0_0_20158645_59.cpp:104:22: error: 'stdin' was not declared in this scope
freopen("1.txt","r",stdin);
^
0_0_20158645_59.cpp:104:27: error: 'freopen' was not declared in this scope
freopen("1.txt","r",stdin);
^
0_0_20158645_59.cpp:105:23: error: 'stdout' was not declared in this scope
freopen("11.txt","w",stdout);
^
0_0_20158645_59.cpp:109:31: error: 'scanf' was not declared in this scope
while(scanf("%d%d%d",&n,&m,&p)!=EOF)
^
0_0_20158645_59.cpp:109:34: error: 'EOF' was not declared in this scope
while(scanf("%d%d%d",&n,&m,&p)!=EOF)
^
0_0_20158645_59.cpp:111:11: error: 'head' was not declared in this scope
memset(head,0,sizeof(head));
^
0_0_20158645_59.cpp:111:30: error: 'memset' was not declared in this scope
memset(head,0,sizeof(head));
^
0_0_20158645_59.cpp:112:11: error: 'son' was not declared in this scope
memset(son,0,sizeof(son));
^
0_0_20158645_59.cpp:115:17: error: 'v' was not declared in this scope
scanf("%d",&v[i]);
^
0_0_20158645_59.cpp:127:18: error: 'getchar' was not declared in this scope
tmp=getchar();
^
0_0_20158645_59.cpp:143:25: error: 'printf' was not declared in this scope
printf("%d\n",ans);
^
|