foo.cc: In function 'int main()':
foo.cc:112:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
112 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:114:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
114 | scanf("%d",&x);
| ~~~~~^~~~~~~~~
foo.cc:119:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
119 | for(i=1;i<n;i++)scanf("%d%d",&x,&y),add(x,y),add(y,x);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:123:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
123 | scanf("%d",&Q);
| ~~~~~^~~~~~~~~
foo.cc:125:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
125 | scanf("%s%d",op,&x);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:127:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
127 | scanf("%d",&y);
| ~~~~~^~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务