Language: C++

i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}

Compiler output:
a.cc:1:1: error: 'i' does not name a type
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      | ^
a.cc:1:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                         ^~~~
a.cc: In function 'int main()':
a.cc:1:50: error: 'n' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                  ^
a.cc:1:53: error: 'm' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                     ^
a.cc:1:36: error: 'scanf' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                    ^~~~~
a.cc:1:56: error: 'i' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                        ^
a.cc:1:71: error: 'a' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                       ^
a.cc:1:84: error: 'm' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                    ^
a.cc:1:88: error: 'k' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                        ^
a.cc:1:105: error: 'i' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                         ^
a.cc:1:93: error: 'scanf' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                             ^~~~~
a.cc:1:115: error: 'n' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                   ^
a.cc:1:124: error: 'a' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                            ^
a.cc:1:132: error: 'c' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                                    ^
a.cc:1:151: error: 'n' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                                                       ^
a.cc:1:159: error: 'c' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                                                               ^
a.cc:1:164: error: 'k' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                                                                    ^
a.cc:1:173: error: 'i' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                                                                             ^
a.cc:1:191: error: 'i' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                                                                                               ^
a.cc:1:177: error: 'printf' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                                                                                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
a.cc:1:196: error: 'exit' was not declared in this scope
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}
      |                                                                                                                                                                                                    ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | i,k,n,m,a[1001],c[1001];main(){for(scanf("%d%d",&n,&m);i<n;scanf("%d",a+i++));for(;m--;k=0){scanf("%d",&i);for(;k<n;k++)if(a[k]<=i)c[k]++,k=n;}for(;--n+1;)if(c[n]>k)k=c[n],i=n;printf("%d\n",i+1);exit(0);}