foo.cc: In function 'int main()':
foo.cc:12:22: error: 'ans' was not declared in this scope
if(b[j]>=a[i]) j--,ans++;
^~~
foo.cc:12:22: note: suggested alternative: 'abs'
if(b[j]>=a[i]) j--,ans++;
^~~
abs
foo.cc:15:19: error: 'ans' was not declared in this scope
printf("%d\n",ans);
^~~
foo.cc:15:19: note: suggested alternative: 'abs'
printf("%d\n",ans);
^~~
abs
foo.cc:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
~~~~~^~~~~~~~~~~~~~
foo.cc:7:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1;i<=n;i++) scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~
foo.cc:8:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1;i<=m;i++) scanf("%d",&b[i]);
~~~~~^~~~~~~~~~~~