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:49:18: warning: unused variable 'ans' [-Wunused-variable]
49 | int x=bfs(0),ans=0;
| ^~~
foo.cc:41:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
41 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
foo.cc:45:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
45 | scanf("%d%d",&u,&v);
| ~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务