foo.cc: In function 'int main()':
foo.cc:13:18: error: 'cout' was not declared in this scope
if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
^~~~
foo.cc:13:49: error: 'endl' was not declared in this scope
if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
^~~~
foo.cc:13:49: note: suggested alternative: 'enum'
if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
^~~~
enum
foo.cc:13:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
^~
foo.cc:13:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
^
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]);
~~~~~^~~~~~~~~~~~