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