0_0_33904818_28342.cpp:12:18: error: expected initializer before 'siz'
int cnt,n,head[N]siz[N],sum;
^
0_0_33904818_28342.cpp: In function 'void addEdge(int, int, int)':
0_0_33904818_28342.cpp:20:25: error: 'head' was not declared in this scope
edge[cnt]=(Node){to,head[from],w};
^
0_0_33904818_28342.cpp: In function 'void dfs1(int, int, int)':
0_0_33904818_28342.cpp:25:15: error: 'head' was not declared in this scope
for(int i=head[u];i!=-1;i=edge[i].next){
^
0_0_33904818_28342.cpp:28:16: error: 'siz' was not declared in this scope
dp[1]+=siz[v]*(w+edge[i].w);
^
0_0_33904818_28342.cpp: In function 'void dfs2(int, int)':
0_0_33904818_28342.cpp:35:15: error: 'head' was not declared in this scope
for(int i=head[u];i!=-1;i=edge[i].next){
^
0_0_33904818_28342.cpp:38:21: error: 'siz' was not declared in this scope
dp[v]=dp[u]-siz[v]*edge[i].w+(sum-siz[v])*edge[i].w;
^
0_0_33904818_28342.cpp:38:39: error: 'sum' was not declared in this scope
dp[v]=dp[u]-siz[v]*edge[i].w+(sum-siz[v])*edge[i].w;
^
0_0_33904818_28342.cpp: In function 'int main()':
0_0_33904818_28342.cpp:47:13: error: 'sum' was not declared in this scope
cnt=sum=0;
^
0_0_33904818_28342.cpp:48:16: error: 'head' was not declared in this scope
memset(head,-1,sizeof(head));
^
0_0_33904818_28342.cpp:50:25: error: 'siz' was not declared in this scope
scanf("%d",&siz[i]);
^
|