criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iosteam>
using namespase std;

int main(){

	int a,b,c,d,e;

cin >> a >> b >> c >> d >> e;

	if( a<40 ){
		a=40;	
}
	if( b<40 ){
		b=40;
}
	if( c<40 ){
		c=40;
}
	if( d<40 ){
		d=40;
}	
	if( e<40 ){
		e=40;
}


cout << (a+b+c+d+e)/5 << endl;

return 0;


}


Compiler output:
a.cc:1:9: fatal error: iosteam: No such file or directory
    1 | #include<iosteam>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include<iosteam>
using namespase std;

int main(){

	int a,b,c,d,e;

cin >> a >> b >> c >> d >> e;

	int m=0;

	if( a<40 ){
		m += 40;	
}
	else{
		m += a;
	}
	if( b<40 ){
		m += 40;
}
	else{
		m += b;
	}
	if( c<40 ){
		m += 40;
}
	else{
		m += c;
}
	if( d<40 ){
		m += 40;
}
	else{
		m += d;
}
	if( e<40 ){
		m += 40;
}
	else{
		m += e;
}


cout << m/5 << endl;

return 0;


}


Compiler output:
a.cc:1:9: fatal error: iosteam: No such file or directory
    1 | #include<iosteam>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespase std;

int main(){

	int a,b,c,d,e;

cin >> a >> b >> c >> d >> e;

	int m=0;

	if( a<40 ){
		m += 40;	
}
	else{
		m += a;
	}
	if( b<40 ){
		m += 40;
}
	else{
		m += b;
	}
	if( c<40 ){
		m += 40;
}
	else{
		m += c;
}
	if( d<40 ){
		m += 40;
}
	else{
		m += d;
}
	if( e<40 ){
		m += 40;
}
	else{
		m += e;}


cout << m/5 << endl;

return 0;


}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 | cin >> a >> b >> c >> d >> e;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:43:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   43 | cout << m/5 << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:43:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   43 | cout << m/5 << endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespase std;

int main(){

	int a,b,c,d,e;

cin >> a >> b >> c >> d >> e;

	int m=0;

	if( a<40 ){
		m += 40;	
}
	else{
		m += a;
	}
	if( b<40 ){
		m += 40;
}
	else{
		m += b;
	}
	if( c<40 ){
		m += 40;
}
	else{
		m += c;
}
	if( d<40 ){
		m += 40;
}
	else{
		m += d;
}
	if( e<40 ){
		m += 40;
}
	else{
		m += e;}


cout << m/5 << endl;

return 0;

}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 | cin >> a >> b >> c >> d >> e;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:43:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   43 | cout << m/5 << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:43:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   43 | cout << m/5 << endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	if (a < 40) {
		a=40
	}
	if (b < 40) {
		b = 40
	}
	if (c < 40) {
		c = 40
	}
	if (d < 40) {
		d = 40
	}
	if (e < 40) {
		e = 40
	}
	cout << (a + b + c + d + e) / 5 << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before '}' token
    8 |                 a=40
      |                     ^
      |                     ;
    9 |         }
      |         ~            
a.cc:11:23: error: expected ';' before '}' token
   11 |                 b = 40
      |                       ^
      |                       ;
   12 |         }
      |         ~              
a.cc:14:23: error: expected ';' before '}' token
   14 |                 c = 40
      |                       ^
      |                       ;
   15 |         }
      |         ~              
a.cc:17:23: error: expected ';' before '}' token
   17 |                 d = 40
      |                       ^
      |                       ;
   18 |         }
      |         ~              
a.cc:20:23: error: expected ';' before '}' token
   20 |                 e = 40
      |                       ^
      |                       ;
   21 |         }
      |         ~
Language: C++

#include<iostream>
using namespace std;
int main(i){
int s[2]={0};
for(;i<6;i++){cin >> s[0];
s[1] += s[0]>39?s[0]:40;
}
cout << s[1]/5 << endl;
return 0;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main(i){
      |     ^~~~
a.cc:3:10: error: 'i' was not declared in this scope
    3 | int main(i){
      |          ^
Language: C++

#include<stdio.h>
int main(i){
int a,sum=0;
for(;i<6;i++){
scanf("%d",&a);
sum += a<40?40:a;
}
printf("%d\n",sum/5);
return 0;
}

Compiler output:
a.cc:2:5: error: cannot declare '::main' to be a global variable
    2 | int main(i){
      |     ^~~~
a.cc:2:10: error: 'i' was not declared in this scope
    2 | int main(i){
      |          ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static java.lang.Integer.parseInt;

public class P0593 {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";

		while ((line = br.readLine()) != null && !line.isEmpty()) {
			int n, m;
			int[][] vote;
			n = parseInt(line.substring(0, line.indexOf(' ')));
			m = parseInt(line.substring(line.indexOf(' ') + 1));
			vote = new int[n][2];
			for (int i = 0; i < n; i++) {
				vote[i][0] = parseInt(br.readLine());
			}
			for (int i = 0; i < m; i++) {
				int cost = parseInt(br.readLine());
				for (int j = 0; j < n; j++) {
					if (vote[j][0] <= cost) {
						vote[j][1]++;
						break;
					}
				}
			}
			int event = 0, max = 0;
			for (int i = 0; i < n; i++) {
				if (vote[i][1] > max) {
					max = vote[i][1];
					event = i;
				}
			}
			System.out.println(event + 1);
		}

	}

}

Compiler output:
Main.java:7: error: class P0593 is public, should be declared in a file named P0593.java
public class P0593 {
       ^
1 error
Language: Java

import java.util.Scanner;
	
	public class main {
	public static void main(String[] args){
		
		Scanner S = new Scanner(System.in);
		int N = S.nextInt();
		int M = S.nextInt();
		int[] A = new int[N];
		int[] A_num = new int[N];
		int[] B = new int[M];
		int answer = 0;
		
		for(int i = 0;i < N;i++){
			A[i] = S.nextInt();
			}
		
		for(int i = 0;i < M;i++){
			B[i] = S.nextInt();
			}
		
		for(int j = 0;j < M;j++){
			int s = B[j];
			
			for(int i = 0;i < N;i++){
				if(s >= A[i]){
					A_num[i]++;
					break;
					}
				}
			}
		int max = A_num[0];
		for(int i = 0;i < N;i++){
			if(max <= A_num[i]){
				max = A_num[i];
				answer = i + 1;
				}
			}
		System.out.println(answer);
		}
	}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
	public class main {
	       ^
1 error
Language: Java

import java.util.Scanner;
	
	public class text {
	public static void main(String[] args){
		
		Scanner S = new Scanner(System.in);
		int N = S.nextInt();
		int M = S.nextInt();
		int[] A = new int[N];
		int[] A_num = new int[N];
		int[] B = new int[M];
		int a = 0;
		
		for(int i = 0;i < N;i++){
			A[i] = S.nextInt();
			}
		
		for(int i = 0;i < M;i++){
			B[i] = S.nextInt();
			}
		
		for(int j = 0;j < M;j++){
			int s = B[j];
			
			for(int i = 0;i < N;i++){
				if(s >= A[i]){
					A_num[i]++;
					break;
					}
				}
			}
		int max = A_num[0];
		for(int i = 0;i < N;i++){
			if(max <= A_num[i]){
				max = A_num[i];
				a = i + 1;
				}
			}
		System.out.print(a);
		}
	}

Compiler output:
Main.java:3: error: class text is public, should be declared in a file named text.java
	public class text {
	       ^
1 error
Language: Java

package text;

import java.util.Scanner;
	
	public class main {
		
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] A = new int[n];
		int[] a_monney= new int[n];
		int[] b = new int[m];
		int answer = 0;
		
		for(int i = 0;i < n;i++){
			A[i] = sc.nextInt();
			}
		
		for(int i = 0;i < m;i++){
			b[i] = sc.nextInt();
			}
		
		for(int i = 0;i < m;i++){
			int s = b[i];
			for(int j = 0;j < n;j++){
				if(s >= A[j]){
					a_monney[j]++;
					break;
					}
				}
			}
		
		int max = a_monney[0];
		
		for(int i = 0;i < n;i++){
			if(max <= a_monney[i]){
				max = a_monney[i];
				answer = i + 1;
				}
			}
		System.out.print(answer);
		}
	}

Compiler output:
Main.java:5: error: class main is public, should be declared in a file named main.java
	public class main {
	       ^
1 error
Language: Java

import java.util.Scanner;
     
    public class main {
         
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
 
        int n = s.nextInt();
        int m = s.nextInt();
        int[] A = new int[n];
        int[] a_= new int[n];
        int[] b = new int[m];
        int answer = 0;
         
        for(int i = 0;i < n;i++){
            A[i] = s.nextInt();
            }
         
        for(int i = 0;i < m;i++){
            b[i] = s.nextInt();
            }
         
        for(int i = 0;i < m;i++){
            int s = b[i];
            for(int j = 0;j < n;j++){
                if(s >= A[j]){
                    a_[j]++;
                    break;
                    }
                }
            }
         
        int max = a_[0];
         
        for(int i = 0;i < n;i++){
            if(max <= a_[i]){
                max = a_[i];
                answer = i + 1;
                }
            }
        System.out.print(answer);
        }
    }

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
    public class main {
           ^
Main.java:24: error: variable s is already defined in method main(String[])
            int s = b[i];
                ^
2 errors
Language: Java

import java.util.*;
     
    public class main {
         
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
 
        int n = s.nextInt();
        int m = s.nextInt();
        int[] A = new int[n];
        int[] a_= new int[n];
        int[] b = new int[m];
        int answer = 0;
         
        for(int i = 0;i < n;i++){
            A[i] = s.nextInt();
            }
         
        for(int i = 0;i < m;i++){
            b[i] = s.nextInt();
            }
         
        for(int i = 0;i < m;i++){
            int s = b[i];
            for(int j = 0;j < n;j++){
                if(s >= A[j]){
                    a_[j]++;
                    break;
                    }
                }
            }
         
        int max = a_[0];
         
        for(int i = 0;i < n;i++){
            if(max <= a_[i]){
                max = a_[i];
                answer = i + 1;
                }
            }
        System.out.print(answer);
        }
    }

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
    public class main {
           ^
Main.java:24: error: variable s is already defined in method main(String[])
            int s = b[i];
                ^
2 errors
Language: Java

package kadai_2;

import java.util.*;

public class vote {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int kyougi[] = new int[N];
		int shinsain[] = new int[M];
		int vote[] = new int[N];
		
		for(int j = 0; j < N; j++){
			kyougi[j] = sc.nextInt();
		}
		
		for(int j = 0; j < M; j++){
			shinsain[j] = sc.nextInt();
		}
		
		
		for(int i = 0; i < M; i++){
			for(int j = 0; j < N; j++){
				if(shinsain[i] >= kyougi[j]){
					vote[j]++;
					break;
				}
			}
		
		}
		int MAX = 0;
		for(int i = 0; i < N; i++){
			if(vote[MAX] < vote[i]){
				MAX = i;
			}
		}
		System.out.println(MAX+1);
		
		
		
	}
				
}

Compiler output:
Main.java:5: error: class vote is public, should be declared in a file named vote.java
public class vote {
       ^
1 error
Language: Java

import java.io.*;
import java.util.StringTokenizer;
import java.util.Arrays;

class Main{

static final PrintWriter out=new PrintWriter(System.out);

public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
StringTokenizer st=new StringTokenizer(line);
int n=Integer.parseInt(st.nextToken());
int m=Integer.parseInt(st.nextToken());
int[] cost=new int[n];
int[] vote1=new int[n];
for(int i=0;i<n;i++) cost[i]=Integer.parseInt(br.readLine());
for(int i=0;i<m;i++){
int judge=Integer.parseInt(br.readLine());
for(int j=0;j<n;j++){
if(cost[j]>judge) continue;
vote1[j]++;
break;
}
}
int[] vote2=vote1.clone();
Arrays.sort(vote2);
int max=vote2[n-1];
for(int i=0;i<n;i++){
if(vote1[i]==max){
out.prntln(i+1);
break;
}
}
out.flush();
}
}
}

Compiler output:
Main.java:32: error: cannot find symbol
out.prntln(i+1);
   ^
  symbol:   method prntln(int)
  location: variable out of type PrintWriter
1 error
Language: Java

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n,m;
		n = sc.nextInt();
		m = sc.nextInt();
		int a[] = new int[n];
		int b[] = new int[m];
		int vote[] = new int[n];
		int max = 0;
		int answer = 0;
		for(int i=0;i<n;i++){
			a[i] = sc.nextInt();
		}
		for(int i=0;i<m;i++){
			b[i] = sc.nextInt();
		}
		for(int i=0;i<m;i++){
			int j = 0;
			while(b[i] < a[j]){
				j++;
			}
			vote[j] ++;
		}
		for(int i=0;i<n;i++){
			if(vote[i] > answer){
				max = vote[i];
				answer = i+1;
			}
		}
		System.out.println(answer);
	}

}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

package Spring;
import java.util.*;
public class Main1 {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n];//??¶???????????¨
		int b[] = new int[m];//????????????
		int cnt[] = new int[n];//????????????
		int max = 0, idx = 0;//?????§?????¨????????????????????????
		for(int i = 0;i < n;i++){
			a[i] = sc.nextInt();
			cnt[i] = 0;//????????????????????????
		}
		for(int i = 0;i < m;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < m;i++){
			for(int k = 0;k < n;k++){
				if(a[k] <= b[i]){
					cnt[k]++;
					break;
				}
			}
		}
		for(int i = 0;i < n;i++){
			if(max < a[i]){
				max = a[i];
				idx = i;
			}
		}
		System.out.println(idx);
	}
}

Compiler output:
Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
       ^
1 error
Language: Java

import java.util.*;
public class Main1 {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n];//??¶???????????¨
		int b[] = new int[m];//????????????
		int cnt[] = new int[n];//????????????
		int max = 0, idx = 0;//?????§?????¨????????????????????????
		for(int i = 0;i < n;i++){
			a[i] = sc.nextInt();
			cnt[i] = 0;//????????????????????????
		}
		for(int i = 0;i < m;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < m;i++){
			for(int k = 0;k < n;k++){
				if(a[k] <= b[i]){
					cnt[k]++;
					break;
				}
			}
		}
		for(int i = 0;i < n;i++){
			if(max < a[i]){
				max = a[i];
				idx = i;
			}
		}
		System.out.println(idx);
	}
}

Compiler output:
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
       ^
1 error
Language: Java

import java.util.Scanner;
public class Main1 {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n];//??¶???????????¨
		int b[] = new int[m];//????????????
		int cnt[] = new int[n];//????????????
		int max = 0, idx = 0;//?????§?????¨????????????????????????
		for(int i = 0;i < n;i++){
			a[i] = sc.nextInt();
			cnt[i] = 0;//????????????????????????
		}
		for(int i = 0;i < m;i++){
			b[i] = sc.nextInt();
		}
		for(int i = 0;i < m;i++){
			for(int k = 0;k < n;k++){
				if(a[k] <= b[i]){
					cnt[k]++;
					break;
				}
			}
		}
		for(int i = 0;i < n;i++){
			if(max < cnt[i]){
				max = cnt[i];
				idx = i;
			}
		}
		System.out.println(idx + 1);
	}
}

Compiler output:
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
       ^
1 error
Language: Java


import java.util.Scanner;

public class AOJ0593 {

	public static void main(String[] args) {
		Scanner sc  = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] Ai = new int[N];
		int[] Bi = new int[M];
		int[] point = new int[N];
		int res = 0;
		for(int i = 0; i < N; i++){
			Ai[i] = sc.nextInt();
		}
		for(int j = 0; j < M; j++){
			Bi[j] = sc.nextInt();
		}
		for(int j = 0; j < M; j++){
			for(int i = N - 1; 0 <= i; i--){
				if(Bi[j] >= Ai[i]){
					res = i + 1;
				}
			}
			point[res]++;
		}
		int Maxp = 0;
		int pointer = 0;
		for(int i = N - 1; 0 <= i; i--){
			if(Maxp < point[i]){
				Maxp = point[i];
				pointer = i;
			}
		}
		System.out.println(pointer);
	}
}

Compiler output:
Main.java:4: error: class AOJ0593 is public, should be declared in a file named AOJ0593.java
public class AOJ0593 {
       ^
1 error
Language: Java

mport java.util.*;
public class AOJ0593{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int i,j,x,c;
		int max=0,maxn=0;
		int s=sc.nextInt();
		int o=sc.nextInt();
		
		int [][]sn = new int [s][2];
		int []ol = new int [o];

		for(i=0;i<s;i++){
			int m=sc.nextInt();
			sn[i][0]=m;
			sn[i][1]=0;
			
		}
		
		for(i=0;i<o;i++){
			int e=sc.nextInt();
			ol[i]=e;
			
		}
		
		
		for(i=0;i<o;i++){
			for(j=0;j<s;j++){
				System.out.println("d");
				if(ol[i]>=sn[j][0]) {
					sn[j][1]++;
					break;
				}
			}
		}
		
		for(i=0;i<s;i++){
			if(sn[i][1]>max) {
				max=sn[i][1];
				maxn=i+1;
			}
		}
		
		System.out.printf("%d\n",maxn);
		sc.close();
		System.exit(0);
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

mport java.util.*;
public class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int i,j,x,c;
		int max=0,maxn=0;
		int s=sc.nextInt();
		int o=sc.nextInt();
		
		int [][]sn = new int [s][2];
		int []ol = new int [o];

		for(i=0;i<s;i++){
			int m=sc.nextInt();
			sn[i][0]=m;
			sn[i][1]=0;
			
		}
		
		for(i=0;i<o;i++){
			int e=sc.nextInt();
			ol[i]=e;
			
		}
		
		
		for(i=0;i<o;i++){
			for(j=0;j<s;j++){
				System.out.println("d");
				if(ol[i]>=sn[j][0]) {
					sn[j][1]++;
					break;
				}
			}
		}
		
		for(i=0;i<s;i++){
			if(sn[i][1]>max) {
				max=sn[i][1];
				maxn=i+1;
			}
		}
		
		System.out.printf("%d\n",maxn);
		sc.close();
		System.exit(0);
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

import java.util.Scanner;

public class AOJ0593 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		 int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] cost = new int[n][2];
        int[] std = new int[m];
        for (int i=0; i<n; i++)
            cost[i][0] = sc.nextInt();
        for (int i=0; i<m; i++) 
            std[i] = sc.nextInt();
        java.util.Arrays.sort(std);
        for (int i=0; i<m; i++) {
            for (int j=0; j<n; j++) {
                if (cost[j][0] <= std[i]) {
                    cost[j][1] += 1;
                    break;
                }
            }
        }
        int tmp = cost[0][1];
        int ans = 1;
        for (int i=0; i<n; i++) {
            if (tmp <cost[i][1]) {
                tmp = cost[i][1];
                ans = i+1;
            }
        }
        System.out.println(ans);
    }
}

Compiler output:
Main.java:3: error: class AOJ0593 is public, should be declared in a file named AOJ0593.java
public class AOJ0593 {
       ^
1 error
Language: Java

import java.util.*;
public class AOJ_0593 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[]k = new int[n];
		int[]s = new int[m];
		int[]count = new int[n];
		for(int i = 0; i < n; i++){
			k[i] = sc.nextInt();
		}
		for(int i = 0; i < m; i++){
			s[i] = sc.nextInt();
		}
		for(int i = 0; i < n; i++){
			count[i] = 0;
		}
		
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				if(s[i] >= k[j]){
					count[j] = count[j] + 1;
					break;
				}
			}
		}
		int h = 0;
		int c = 0;
		int i;
		for(i = 0; i < n; i++){
			if(h > count[i]){
			}else if(h < count[i]){
				h = count[i];
				c = i;
			}
		}
		System.out.println(c + 1);

	}

}

Compiler output:
Main.java:2: error: class AOJ_0593 is public, should be declared in a file named AOJ_0593.java
public class AOJ_0593 {
       ^
1 error
Language: C

main(i,k,n,m,a[1001],c[1001]){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);}

Compiler output:
main.c:1:15: error: expected ')' before '[' token
    1 | main(i,k,n,m,a[1001],c[1001]){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);}
      |               ^
      |               )
Language: C

#include <cstdio>
int main(){
	int N,M;
	scanf("%d %d",&N,&M);
	int A[1000];
	int Ai;
	int Bj;
	int count[1000];
	for(int i=0;i<N;i++){
		scanf("%d",&Ai);
		A[i]=Ai;
		count[i]=0;
	}
	for(int j=0;j<M;j++){
		scanf("%d",&Bj);
		for(int i=0;i<N;i++){
			if(A[i]<=Bj){count[i]++;break;}
		}
	}
	int max_count=0;
	int max_game=-1;
	for(int i=0;i<N;i++){
		if(max_count<count[i]){
			max_count=count[i];
			max_game=i;
		}
	}

	printf("%d\r\n",max_game+1);
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(void){
	int i,j,a[1000],b[1000],c,d=0,N,M,o;
	scanf("%d%d",&N,&M);
for(i=0;i<N;i++){
b[i]=0;
}
	for(i=0;i<N;i++){
	scanf("%d",&a[i]);
}
for(i=0;i<M;i++){
	scanf("%d",&c);
	for(j=0;j<N;j++){
	if(a[j]<=c){
	b[j]++;
	break;
}

}

}
for(i=0;i<N;i++){
   if(d<b[i]){
d=b[i]
o=i;
}
}
printf("%d\n",d+1);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:7: error: expected ';' before 'o'
   24 | d=b[i]
      |       ^
      |       ;
   25 | o=i;
      | ~
Language: C

#include<stdio.h>
int main(void){
	int i,j,a[1000],b[1000],c,d,N,M,o=0;
	scanf("%d %d",&N,&M);
	for(i=0;i<N;i++){
	scanf("%d",&a[i]);
	b[i]=0;
}
for(i=0;i<M;i++){
	scanf("%d",&c);
	for(j=0;j<N;j++){
	if(a[j]<=c){
	b[j]++;
	break;
}
}
}
for(i=0;i<N;i++){
   if(o<b[i]){
o=b[i]
d=i+1;
}
}
printf("%d\n",d);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:7: error: expected ';' before 'd'
   20 | o=b[i]
      |       ^
      |       ;
   21 | d=i+1;
      | ~
Language: C

#include <stdio.h>

int main() {
	int i, j, n, m;
	int game[1000], judge[1000], ticket[1000] = { 0 };
	scanf("%d %d", &n, &m);
	for( i = 0; i < n; i++) scanf("%d", &game[i]);
	for( i = 0; i < m; i++) scanf("%d", &judge[1000]);
	for( i = 0; i < m; i++){
		for( j = 0; j < n; i++) {
			if( game[j] <= judge[i] ) {
				ticket[j]++;
				break;
			}
		}
	}
	for( i = 1; i < n; i++) {
		if( ticket[max] < ticket[i] ) max = i;
	}
	printf("%d\n", max);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:28: error: 'max' undeclared (first use in this function)
   18 |                 if( ticket[max] < ticket[i] ) max = i;
      |                            ^~~
main.c:18:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
  int n, m, i, j, x, A;
  scanf("%d %d", &n, &m);
  int a[n], b[m], c[n] = {0};
  for(i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for(i = 0; i < m; i++) {
    scanf("%d", &b[i]);
  }
  for(i = 0; i < m; i++) {
    x = n;
    for(j = 0; j < n; j++) {
      if(b[i] > = a[j] && x > j){
        x = j;
      }
    }
    c[x] = c[x] + 1;
  }
  x = 0;
  for(i = 0; i < n; i++) {
    if(x < c[i]){
      x = c[i];
      A = i;
    }
  }
  printf("%f", A);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:26: error: variable-sized object may not be initialized except with an empty initializer
    6 |   int a[n], b[m], c[n] = {0};
      |                          ^
main.c:16:17: error: expected expression before '=' token
   16 |       if(b[i] > = a[j] && x > j){
      |                 ^
Language: C

#include <stdio.h>

int main(void){
  int n, m, i, j, x, A;
  scanf("%d %d", &n, &m);
  int a[n], b[m], c[n] = {0};
  for(i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for(i = 0; i < m; i++) {
    scanf("%d", &b[i]);
  }
  for(i = 0; i < m; i++) {
    x = n;
    for(j = 0; j < n; j++) {
      if(b[i] > = a[j] && x > j){
        x = j;
      }
    }
    c[x] = c[x] + 1;
  }
  x = 0;
  for(i = 0; i < n; i++) {
    if(x < c[i]){
      x = c[i];
      A = i;
    }
  }
  printf("%d", A);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:26: error: variable-sized object may not be initialized except with an empty initializer
    6 |   int a[n], b[m], c[n] = {0};
      |                          ^
main.c:16:17: error: expected expression before '=' token
   16 |       if(b[i] > = a[j] && x > j){
      |                 ^
Language: C

/*????\¨(Vote)*/
#include <stdio.h>
int main(){
  int i, j, x, y, z, N, M;
  int A[1000] = {0};
  int B[1000] = {0};
  int data[1000] = {0};
  scanf("%d %d", &N, &M);
  for (i = 1; i - 1 < N; i++) {
    scanf("%d", &A[i - 1]);
  }
  for (j = 1; j - 1 < M; j++) {
    scanf("%d", &B[j - 1]);
  }
  for (j = 1; j - 1 < M; j++) {
    x = 0;
    for (i = N; 0 < i; i--) {
      if (A[i - 1] <= B[j - 1]) {
        x = i - 1;
	  }
	}
    data[x]++;
  }
  y = data[0];
  for (i = 1; i - 1 < N; i++) {
    if (y < data[i - 1]) {
	y = [i - 1];
	z = i - 1;
    }
  }
  printf("%d\n", z);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:13: error: expected expression before '[' token
   27 |         y = [i - 1];
      |             ^
Language: C

#include <stdio.h>

int main(void)
{
	int N,M,i,j;
	scanf("%d %d",&N,&M);
	int a[N+1];
//a[]????????¢??????????????¶?????????????????????????????????????????¨???
	for(i=1;i<N+1;i++)scanf("%d",&a[i]);

	int b[M+1],vote[M+1],max,kixyougi[N+1];
//b[]???????§????M????????????????????????kixyougi[]?????????????????¶??????????\¨??\??£????????????
	for(i=1;i<M+1;i++)
	{
		scanf("%d",&b[i]);
		for(j=1;j<N+1;j++)
		{
			if(b[i]>a[j]){
				vote[i]=j
				kixyougi[j]++
				break;
		}
	}
	for(j=1;j<N+1;j++){
		max=kixyougi[1];
		if(kixyougi[j]>max)max=kixyougi[j];
	}
	printf("%d\n",max);
	return 0;
}		
		
	
		

Compiler output:
main.c: In function 'main':
main.c:19:42: error: expected ';' before 'kixyougi'
   19 |                                 vote[i]=j
      |                                          ^
      |                                          ;
   20 |                                 kixyougi[j]++
      |                                 ~~~~~~~~  
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include <stdio.h>
int main(void){
    int n,m,i,j,max;
    scanf("%d %d",&n,&m);
    int a[n],b[m],count[n];
    for(i=0;i<n;i++) count[i]=0;
    for(i=0;i<n;i++) scanf("%d",&a[i]);
    for(i=0;i<m;i++) scanf("%d",&b[i]);
 
    for(i=0;i<m;i++){
        for(j=0;;j++){
            if (b[i]>=a[j]) {
                count[j]++;
                break;
            }
        }
    }
    max=1;
    for(i=0;i<n-1;i++){
        if (count[max-1]<count[i+1]) max=i+2;
    }
    printf("%d\n",max);
    return 0;

Compiler output:
main.c: In function 'main':
main.c:23:5: error: expected declaration or statement at end of input
   23 |     return 0;
      |     ^~~~~~
Language: C++

#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;

#define REP(i, a, b) for(int i = (a); i < (int)(b); ++i)
#define rep(i, n) REP(i, 0, n)
#define ALL(v) begin(v), end(v)

int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int n, m;
	cin >> n >> m;

	vector<int> a(n);
	for(auto &e : a) cin >> e;

	vector<int> cnt(n, 0);
	rep(i, m) {
		int b;
		cin >> b;

		rep(j, n) {
			if(a[j] <= b) {
				++cnt[j];
				break;
			}
		}
	}

	cout << max_element(ALL(cnt)) - cnt.begin() + 1 << endl;

	return EXIT_SUCCESS;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:17: error: 'max_element' was not declared in this scope
   33 |         cout << max_element(ALL(cnt)) - cnt.begin() + 1 << endl;
      |                 ^~~~~~~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int N[1000],M[1000],hyo[1000];
int n,m;
cin>>n>>m;
int tmp;
for(int i=0;i<n;i++)cin>>N[i];
for(int i=0;i<m;i++)cin>>M[i];

	for(int i=0;i<m;i++){
		for(int j=0;j<n;j++){
			if(M[i]>=N[j]){
			hyo[j]++;
			break;
			}
		}
	}
	int a=0;ma=hyo[0];
	for(int i=1;i<=n;i++){
		if(hyo[i]>ma)ma=hyo[i],a=i+1;
	}
	//if(a==0)cout<<1<<endl;
	else cout<<a<<endl;


return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: 'ma' was not declared in this scope; did you mean 'a'?
   21 |         int a=0;ma=hyo[0];
      |                 ^~
      |                 a
a.cc:26:9: error: 'else' without a previous 'if'
   26 |         else cout<<a<<endl;
      |         ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <Algorithm>

using namespace std;

int main(void){

	int mem, kyogi;
	cin >> kyogi >> mem;
	int money[kyogi];
	int kijun[mem];
	int score[mem];
	//かかる費用を入力
	for(int i = 0; i < kyogi; i++){
		cin >> money[i];
	}
	//審査員の基準を入力
	for(int i = 0; i < mem; i++){
		cin >> kijun[i];
		score[i] = 0;
	}

	for(int i = 0; i < mem; i++){
		for(int j = 0; j < kyogi; j++){
			if(kijun[i] >= money[j]){
				score[j]++;
				break;
			}
		}
	}
	int log, max = 0;
	for(int i = 0; i < mem; i++){
		if(score[i] > max){
			max = score[i];
			log = i;
		}
	}
	cout << log+1 << endl;

}

Compiler output:
a.cc:3:10: fatal error: Algorithm: No such file or directory
    3 | #include <Algorithm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio>

using namespace std;

int cnt[1024];

int main(void)
{
	int n, m;
	scanf("%d %d",&n, &m);

	int a[1024];
	for (int i = 0; i < n; i++){
		scnaf("%d", &a[i]);
	}

	int b[1024];
	for (int i = 0; i < m; i++){
		scanf("%d", &b[i];
	}

	for (int j = 0; j < m; j++){
		for (int i = 0; i < n; i++){
			if (b[i] >= a[i]){
				cnt[i]++;
				break;
			}
		}
	}

	int ans = 0;
	for (int i = 0; i < n; i++){
		if (cnt[ans] < ans[i]){
			ans = i;
		}
	}
	printf("%d\n", ans + 1);

	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'scnaf' was not declared in this scope; did you mean 'scanf'?
   14 |                 scnaf("%d", &a[i]);
      |                 ^~~~~
      |                 scanf
a.cc:19:34: error: expected ')' before ';' token
   19 |                 scanf("%d", &b[i];
      |                      ~           ^
      |                                  )
a.cc:33:35: error: invalid types 'int[int]' for array subscript
   33 |                 if (cnt[ans] < ans[i]){
      |                                   ^
Language: C++

#include <iostream>
#include <algorithm>

#define rep(X, Y) for( int X = 0; X < Y; ++X )

int n, m;
int N[1001], M[1001];
int cnt[1001];

int main(){
	memset( cnt, 0, sizeof(cnt) );

	std::cin >> n >> m;

	rep( i, n ) std::cin >> N[i];

	rep( i, m ) std::cin >> M[i];

	rep( i, m ) rep( l, n ) if( N[l] <= M[i] ){
		cnt[l]++;
		break;
	}

	std::cout << std::max_element( cnt, cnt + n ) - cnt + 1 << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'memset' was not declared in this scope
   11 |         memset( cnt, 0, sizeof(cnt) );
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <algorithm>
  +++ |+#include <cstring>
    3 |
Language: C++

#include <stdio.h>

int main(void) {
	int vote[1000];
	int list[1000];
	int i,f;
	memset( vote,NULL,sizeof( vote ));
	int a = 0,b = 0,c = 0;
	scanf( "%d %d",&i,&f );
	for( a = 0;a < i;a++ ){
		scanf( "%d",&list[a] );
	}
	for( a = 0;a < f;a++ ){
		scanf( "%d",&c );
		for( b = 0;b < i;b++ ){
			if( list[b] <= c ){ vote[b]++; break; }
		}
	}
	for( a = 0;a < i - 1;a++ ){
		for( b = a + 1;b < i;b++ ){
			if( vote[a] < vote[b] ){
				c = vote[a];
				vote[a] = vote[b];
				vote[b] = c;
			}
		}
	}
	printf( "%d",vote[0] );
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'memset' was not declared in this scope
    7 |         memset( vote,NULL,sizeof( vote ));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <stdio.h>

int main(void) {
	int vote[1000];
	int list[1000];
	int i,f;
	memset( vote,NULL,sizeof( vote ));
	int a = 0,b = 0,c = 0;
	scanf( "%d %d",&i,&f );
	for( a = 0;a < i;a++ ){
		scanf( "%d",&list[a] );
	}
	for( a = 0;a < f;a++ ){
		scanf( "%d",&c );
		for( b = 0;b < i;b++ ){
			if( list[b] < c ){ vote[b]++; break; }
		}
	}
	for( a = 0;a < i - 1;a++ ){
		for( b = a + 1;b < i;b++ ){
			if( vote[a] < vote[b] ){
				c = vote[a];
				vote[a] = vote[b];
				vote[b] = c;
			}
		}
	}
	printf( "%d\n",vote[0] );
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'memset' was not declared in this scope
    7 |         memset( vote,NULL,sizeof( vote ));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 |
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a; i ++)
int main(void){
  int N,M;
  cin>>N>>M;
  vector<int> a(N);
  vector<int> sum(N,0);
  vector<int> a(M);
  
  rep(i,N)cin>>a[i];
  rep(i,M)cin>>b[i];
  
  rep(i,M)
    rep(j,N)
      if(a[j]<=b[i]){
        sum[j]++;
        break;
      }
  
  int maxx = 0;
  int num;
  
  rep(i,n){
    if(maxx<sum[i]){
      maxx = sum[i];
      num = i;
    }
  }
  cout<<num+1<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: redeclaration of 'std::vector<int> a'
   11 |   vector<int> a(M);
      |               ^
a.cc:9:15: note: 'std::vector<int> a' previously declared here
    9 |   vector<int> a(N);
      |               ^
a.cc:14:16: error: 'b' was not declared in this scope
   14 |   rep(i,M)cin>>b[i];
      |                ^
a.cc:18:16: error: 'b' was not declared in this scope
   18 |       if(a[j]<=b[i]){
      |                ^
a.cc:26:9: error: 'n' was not declared in this scope
   26 |   rep(i,n){
      |         ^
a.cc:5:38: note: in definition of macro 'rep'
    5 | #define rep(i,a) for(int i = 0 ; i < a; i ++)
      |                                      ^
Language: C++

#include<stdio.h>

int main(){

int n[1001]={};
int m[1001]={};
int m,n,x;

scanf("%d %d",&n,&m);
for(int i=0;i<n;i++)
scanf("%d",&n[i]);

for(int i=0;i<m;i++)
{scanf("%d",&x);
for(int j=0;j<n;j++)
if(x>=n[j])m[j]++;
}
int t=0;
for(int i=0;i<1000;i++)
if(m[i]>t)t=i+1;

printf("%d\n",t);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: conflicting declaration 'int m'
    7 | int m,n,x;
      |     ^
a.cc:6:5: note: previous declaration as 'int m [1001]'
    6 | int m[1001]={};
      |     ^
a.cc:7:7: error: conflicting declaration 'int n'
    7 | int m,n,x;
      |       ^
a.cc:5:5: note: previous declaration as 'int n [1001]'
    5 | int n[1001]={};
      |     ^
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | for(int i=0;i<n;i++)
      |             ~^~
a.cc:13:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | for(int i=0;i<m;i++)
      |             ~^~
a.cc:15:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 | for(int j=0;j<n;j++)
      |             ~^~
Language: C++

import java.util.Scanner;
	
	public class vote {
		
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);

		int n = s.nextInt();
		int m = s.nextInt();
		int[] A = new int[n];
		int[] a_= new int[n];
		int[] b = new int[m];
		int answer = 0;
		
		for(int i = 0;i < n;i++){
			A[i] = s.nextInt();
			}
		
		for(int i = 0;i < m;i++){
			b[i] = s.nextInt();
			}
		
		for(int i = 0;i < m;i++){
			int s = b[i];
			for(int j = 0;j < n;j++){
				if(s >= A[j]){
					a_[j]++;
					break;
					}
				}
			}
		
		int max = a_[0];
		
		for(int i = 0;i < n;i++){
			if(max <= a_[i]){
				max = a_[i];
				answer = i + 1;
				}
			}
		System.out.print(answer);
		}
	}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:9: error: expected unqualified-id before 'public'
    3 |         public class vote {
      |         ^~~~~~
Language: C++

int d[1000];
int ushi;
int uma;
int main(){
  cin>>n>>m;
  for(int i;i<n;i++){
    cin>>a[i];}
  for(int j;j<m;j++){
    cin>>b[j];}
  for(int k=0;k<n;k++){
    for(int l=0;l<m;l++){
      if(d[l]==0&&a[k]<=b[l]){
	c[k]++;
	d[l]=1;
      }
    }
  if(c[k]>ushi){
    ushi=c[k];
    uma=k;
  }
  }
  cout<<uma+1<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>n>>m;
      |   ^~~
a.cc:5:8: error: 'n' was not declared in this scope
    5 |   cin>>n>>m;
      |        ^
a.cc:5:11: error: 'm' was not declared in this scope
    5 |   cin>>n>>m;
      |           ^
a.cc:7:10: error: 'a' was not declared in this scope
    7 |     cin>>a[i];}
      |          ^
a.cc:9:10: error: 'b' was not declared in this scope
    9 |     cin>>b[j];}
      |          ^
a.cc:12:19: error: 'a' was not declared in this scope
   12 |       if(d[l]==0&&a[k]<=b[l]){
      |                   ^
a.cc:12:25: error: 'b' was not declared in this scope
   12 |       if(d[l]==0&&a[k]<=b[l]){
      |                         ^
a.cc:13:9: error: 'c' was not declared in this scope
   13 |         c[k]++;
      |         ^
a.cc:17:6: error: 'c' was not declared in this scope
   17 |   if(c[k]>ushi){
      |      ^
a.cc:22:3: error: 'cout' was not declared in this scope
   22 |   cout<<uma+1<<endl;
      |   ^~~~
a.cc:22:16: error: 'endl' was not declared in this scope
   22 |   cout<<uma+1<<endl;
      |                ^~~~
Language: C++

#include <iostream>
#include <string>
#include <map>
#include <algorithm>
using namespace std;

/*
int max(map<int, int> m){
	int maxkey = 0;
	for (map<int, int>::iterator it = m.begin(); it != m.end(); it++) {
		if (maxkey < it->second) maxkey = it->first;
	}
  return maxkey;
}
*/

int main(int argc, char const *argv[]) {
	int n, m;
	int a[1000], b[1000];
	vector<int> kyogi(n, 0);

	cin >> n >> m;
	for (int i = 0; i < n; ++i)
	{
		cin >> a[i];
	}
	for (int i = 0; i < m; ++i)
	{
		cin >> b[i];
	}

	for (int i = 0; i < m; ++i)
	{
		for (int j = 0; j < n; ++i)
		{
			if (a[j] <= b[i])
			{
				int pos = kyogi.begin() + i;
				int tmp = kyogi.at(i);
				kyogi.insert(pos, ++tmp);
			}
		}
	}
	
	cout << max_element(kyogi.begin(), kyogi.end()) << endl;


	return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:20:9: error: 'vector' was not declared in this scope
   20 |         vector<int> kyogi(n, 0);
      |         ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    4 | #include <algorithm>
  +++ |+#include <vector>
    5 | using namespace std;
a.cc:20:16: error: expected primary-expression before 'int'
   20 |         vector<int> kyogi(n, 0);
      |                ^~~
a.cc:38:43: error: 'kyogi' was not declared in this scope
   38 |                                 int pos = kyogi.begin() + i;
      |                                           ^~~~~
a.cc:45:29: error: 'kyogi' was not declared in this scope
   45 |         cout << max_element(kyogi.begin(), kyogi.end()) << endl;
      |                             ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;int i,j,N,M,C[1000],K[1000],T[1000],X[2];
main(){cin>>N>>M;
for(i=0;i<N;i++){cin>>C[i];}
for(i=0;i<M;i++){cin>>K[i];
for(j=0;j<N;j++){if(C[j]<=K[i]){T[j] += 1;break;}}}X[0]=0;
for(i=0;i<N;i++){if(T[i]>X[0]){X[0]=T[i];X[1]=i+1;}cout<<X[1]<<endl;}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){cin>>N>>M;
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:70: error: expected '}' at end of input
    7 | for(i=0;i<N;i++){if(T[i]>X[0]){X[0]=T[i];X[1]=i+1;}cout<<X[1]<<endl;}
      |                                                                      ^
a.cc:3:7: note: to match this '{'
    3 | main(){cin>>N>>M;
      |       ^
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
??
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
??
int main(){
??
????????int n,m,kyo,iin,de,max;
????????vector<int> a,b;
??
????????cin >> n >> m;
??????????
????????int res[n];
??
????????rep(i,n){
????????????????cin >> kyo;
????????????????a.push_back(kyo);
????????????????res[i] = 0;
????????}
??
????????rep(i,m){
????????????????cin >> iin;
????????????????b.push_back(iin);
????????}
??????????
????????rep(i,b.size()){
????????????????rep(j,a.size()){
????????????????????????if(b[i] >= a[j]){ 
????????????????????????????????res[j] += 1; 
????????????????????????????????break;
????????????????????????}
????????????????}
????????}
??
????????//rep(i,n) cout << i+1 << "," << res[i] << endl;
??
????????de = 1;
????????max = res[1];
??
????????rep(i,n){
????????????????if(max <= res[i]){
????????????????????????de = i + 1;
????????????????????????max = res[i];
????????????????}
????????}
??????????
????????//cout << "max:" << max << endl;
??
????????cout << de << endl;
??????????????????
????????return 0;???? 
}

Compiler output:
a.cc:40:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
   40 | ????????//rep(i,n) cout << i+1 << "," << res[i] << endl;
a.cc:52:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
   52 | ????????//cout << "max:" << max << endl;
a.cc:7:1: error: expected unqualified-id before '?' token
    7 | ??
      | ^
a.cc:10:1: error: expected unqualified-id before '?' token
   10 | ??
      | ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(){
    
    int n,m;
    cin >> n >> m;
    vector<int> a(n);
    vector<int> b(n);
    vector<int> c(n);
    vector<bool> u(n);
    vector<int> ans(n);
    fill(u.begin(),u.end(),true);
    for(int i=0;i<n;i++){
	cin >> a[i];
    };
    for(int i=0;i<m;i++){
	cin >> b[i];
    }
    for(int i=0;i<n;i++){
	for(int j=0;j<m;j++){
	    if(u[j] && a[i] <= b[j]){
		u[i] = false;
		ans[i]++;
	    }
	}
    }
    int res = 0,ansnum = 0;;
    for(int i=0;i<n;i++){
	if(res < ans[i]){
	    res = ans[i];
	    ansnum = i + 1;
	}
    }

    cout << ansnum << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'vector' was not declared in this scope
   10 |     vector<int> a(n);
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | 
a.cc:10:12: error: expected primary-expression before 'int'
   10 |     vector<int> a(n);
      |            ^~~
a.cc:11:12: error: expected primary-expression before 'int'
   11 |     vector<int> b(n);
      |            ^~~
a.cc:12:12: error: expected primary-expression before 'int'
   12 |     vector<int> c(n);
      |            ^~~
a.cc:13:12: error: expected primary-expression before 'bool'
   13 |     vector<bool> u(n);
      |            ^~~~
a.cc:14:12: error: expected primary-expression before 'int'
   14 |     vector<int> ans(n);
      |            ^~~
a.cc:15:10: error: 'u' was not declared in this scope
   15 |     fill(u.begin(),u.end(),true);
      |          ^
a.cc:17:16: error: 'a' was not declared in this scope
   17 |         cin >> a[i];
      |                ^
a.cc:20:16: error: 'b' was not declared in this scope
   20 |         cin >> b[i];
      |                ^
a.cc:24:24: error: 'a' was not declared in this scope
   24 |             if(u[j] && a[i] <= b[j]){
      |                        ^
a.cc:24:32: error: 'b' was not declared in this scope
   24 |             if(u[j] && a[i] <= b[j]){
      |                                ^
a.cc:26:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |                 ans[i]++;
      |                 ^~~
      |                 abs
a.cc:32:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   32 |         if(res < ans[i]){
      |                  ^~~
      |                  abs
Language: C++

#include <iostream>

using namespace std;

int main(){
	int n, m;
	cin >> n;
	cin >> m;
	int a[1000] = {};
	int b[1000] = {};
	int point[4];
	int selected;

	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	for(int i = 0; i < m; i++){
		cin >> b[i];
	}

	for(int i = 0; i < m; i++){
		for(int j = 0; j < n; j++){
			if(a[i] => b[j]){
				point[i]++;
				break;
			}
		}
	}

	for(int i = 0; i < n - 1; i++){
		if(point[i] < point[i + 1]){
			selected = i;
		}
	}

	cout << selected << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:34: error: expected primary-expression before '>' token
   23 |                         if(a[i] => b[j]){
      |                                  ^