foo.cc:3:1: error: expected initializer before 'using'
using namespace std;
^~~~~
foo.cc: In function 'int main()':
foo.cc:10:24: error: 'b' was not declared in this scope
scanf("%d %d",&b[i],&a[i]);
^
foo.cc:22:19: error: 'b' was not declared in this scope
x=b[j];
^
foo.cc:28:20: error: 'b' was not declared in this scope
if(b[j]>b[j+1])
^
foo.cc:38:11: error: 'h' was not declared in this scope
for(i=h;a[i]==a[i+1];i++)
^
foo.cc:42:24: error: 'h' was not declared in this scope
printf("%d %d\n",a[h],h);
^
foo.cc:45:26: error: 'b' was not declared in this scope
printf("%d %d\n",b[i],a[i]);
^
foo.cc:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&n,&m);
~~~~~^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务