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]
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]
scanf("%d",&x);
~~~~~^~~~~~~~~
foo.cc:119:47: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
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]
scanf("%d",&Q);
~~~~~^~~~~~~~~
foo.cc:125:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
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]
scanf("%d",&y);
~~~~~^~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务