foo.cc: In function 'int bfs(int)':
foo.cc:22:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | for(int i=0;i<p[t].nxt.size();++i)
| ~^~~~~~~~~~~~~~~~
foo.cc: In function 'void dfs(int, int)':
foo.cc:31:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
31 | for(int i=0;i<p[x].nxt.size();++i)
| ~^~~~~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:50:18: warning: unused variable 'ans' [-Wunused-variable]
50 | int x=bfs(0),ans=0;
| ^~~
foo.cc:42:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
42 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
foo.cc:46:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
46 | scanf("%d%d",&u,&v);
| ~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务