foo.cc: In function 'int main()':
foo.cc:11:24: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
scanf("%d",a[i]);
~~~~^
foo.cc:19:20: error: 'i' was not declared in this scope
if(s[a[i]]==0){
^
foo.cc:9:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&N);
~~~~~^~~~~~~~~
foo.cc:11:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",a[i]);
~~~~~^~~~~~~~~~~
foo.cc:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&M);
~~~~~^~~~~~~~~
foo.cc:15:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&l,&r);
~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务