foo.cc: In function 'int main()':
foo.cc:37:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
37 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
foo.cc:40:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
40 | int x,son;scanf("%d",&x);
| ~~~~~^~~~~~~~~
foo.cc:41:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
41 | scanf("%d%d",&cost[x],&son);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc:45:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
45 | int v;scanf("%d",&v);
| ~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务