foo.c:2:1: error: unknown type name 'using'
2 | using namespace std;
| ^~~~~
foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
2 | using namespace std;
| ^~~
foo.c: In function 'main':
foo.c:6:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
6 | scanf("%d%d",&n,&Q);
| ^~~~~~~~~~~~~~~~~~~
foo.c:7:23: warning: ignoring return value of 'scanf', 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.c:9:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
9 | scanf("%d%d",&l,&r);
| ^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务