foo.cc: In function 'void DFS(int, int)':
foo.cc:60:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < edge[x].son.size(); i++)
~~^~~~~~~~~~~~~~~~~~~~
foo.cc: In function 'void FindDFS(int)':
foo.cc:75:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < edge[x].son.size(); i++)
~~^~~~~~~~~~~~~~~~~~~~
foo.cc:80:51: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
ans[y] = ans[x] + (edge[root].num - edge[y].num << 1) * edge[x].dis[i];
~~~~~~~~~~~~~~~^~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:91:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:93:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&edge[i].num);
~~~~~^~~~~~~~~~~~~~~~~~~
foo.cc:97:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &x, &y, &z);
~~~~~^~~~~~~~~~~~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。