foo.cc: In function 'int main()':
foo.cc:18:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
18 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:19:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
19 | for(int i=1;i<=n;i++) scanf("%d",&w[i]);
| ~~~~~^~~~~~~~~~~~
foo.cc:23:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
23 | scanf("%d%d%d",&ai,&bi,&wi);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc:27:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
27 | scanf("%d",&q);
| ~~~~~^~~~~~~~~
foo.cc:30:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
30 | scanf("%d%d",&ui,&vi);
| ~~~~~^~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务