foo.cc: In function 'int main()':
foo.cc:6:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
6 | scanf("%d%d",&n,&Q);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:7:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
7 | for(int i=1;i<=n;i++){scanf("%d",&a[i]);s[i]=s[i-1]+a[i];}
| ~~~~~^~~~~~~~~~~~
foo.cc:9:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
9 | scanf("%d%d",&l,&r);
| ~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务