foo.cc: In function 'void anode(int, int, long long int)':
foo.cc:39:9: error: 'struct node' has no member named 'val'; did you mean 'value'?
G[len].val=z;
^~~
value
foo.cc: In function 'void dfs(int)':
foo.cc:45:23: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
for (int i=head[u]; i=0; i=G[i].pre)
~^~
foo.cc:47:26: error: 'struct node' has no member named 'val'; did you mean 'value'?
s[G[i].next]=s[u]+G[i].val,dfs(G[i].next);
^~~
value
foo.cc: In function 'int main()':
foo.cc:63:9: error: too few arguments to function 'void anode(int, int, long long int)'
anode()
^
foo.cc:34:6: note: declared here
void anode(int x,int y,ll z)
^~~~~
foo.cc:64:18: warning: statement has no effect [-Wunused-value]
for (int i=1; i<=n; ++i)
~^~~
foo.cc:64:26: error: expected ';' before ')' token
for (int i=1; i<=n; ++i)
^
foo.cc:61:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&z);
~~~~~^~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务