foo.cc: In function 'int main()':
foo.cc:113:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
113 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:115:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
115 | scanf("%d",&x);
| ~~~~~^~~~~~~~~
foo.cc:120:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
120 | for(i=1;i<n;i++)scanf("%d%d",&x,&y),add(x,y),add(y,x);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:124:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
124 | scanf("%d",&Q);
| ~~~~~^~~~~~~~~
foo.cc:126:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
126 | scanf("%s%d",op,&x);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:128:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
128 | scanf("%d",&y);
| ~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务