criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		Map<Integer,List<City>> map = new HashMap<>();
		for(int i=0;i<m;i++) {
			int p = in.nextInt();
			int y = in.nextInt();
			if(map.containsKey(p)) {
				map.get(p).add(new City(p,y,i));
			}else {
				List<City> list = new ArrayList<>();
				list.add(new City(p,y,i));
				map.put(p, list);
			}
		}
		
		List<City> allCities = new ArrayList<>();
		
		for(int p : map.keySet()) {
			List<City> list = map.get(p);
			list.sort((c1,c2)->c1.year-c2.year);
			for(int i=0;i<list.size();i++) {
				City city = list.get(i);
				city.cityNumber = get6digit(p) + get6digit(i+1);
				allCities.add(city);
			}
		}
		
		allCities.sort((c1,c2)->c1.number-c2.number);
		
		for(City city : allCities) {
			System.out.println(city.cityNumber);
		}
		in.close();
		

	}
	
	public static String get6digit(int x) {
		String ret = "";
		for(int i=0;i<6;i++) {
			ret = x%10 + ret;
			x /= 10;
		}
		return ret;
		
	}
  
  public class City {
	public int prefecture;
	public int year;
	public int number;
	public String cityNumber;
	
	public City(int p,int y,int num) {
		this.prefecture = p;
		this.year = y;
		this.number = num;
	}
}

}






Compiler output:
Main.java:18: error: non-static variable this cannot be referenced from a static context
				map.get(p).add(new City(p,y,i));
				               ^
Main.java:21: error: non-static variable this cannot be referenced from a static context
				list.add(new City(p,y,i));
				         ^
2 errors
Language: Java

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		Map<Integer,List<City>> map = new HashMap<>();
		for(int i=0;i<m;i++) {
			int p = in.nextInt();
			int y = in.nextInt();
			if(map.containsKey(p)) {
				map.get(p).add(new City(p,y,i));
			}else {
				List<City> list = new ArrayList<>();
				list.add(new City(p,y,i));
				map.put(p, list);
			}
		}
		
		List<City> allCities = new ArrayList<>();
		
		for(int p : map.keySet()) {
			List<City> list = map.get(p);
			list.sort((c1,c2)->c1.year-c2.year);
			for(int i=0;i<list.size();i++) {
				City city = list.get(i);
				city.cityNumber = get6digit(p) + get6digit(i+1);
				allCities.add(city);
			}
		}
		
		allCities.sort((c1,c2)->c1.number-c2.number);
		
		for(City city : allCities) {
			System.out.println(city.cityNumber);
		}
		in.close();
		

	}
	
	public static String get6digit(int x) {
		String ret = "";
		for(int i=0;i<6;i++) {
			ret = x%10 + ret;
			x /= 10;
		}
		return ret;
		
	}

}

public class City {
	public int prefecture;
	public int year;
	public int number;
	public String cityNumber;
	
	public City(int p,int y,int num) {
		this.prefecture = p;
		this.year = y;
		this.number = num;
	}
}




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

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>

using namespace std;

int main() {
  int N, M;
  cin >> N >> M:
  vector<int> P(M), Y(M);
  vector<vector<int>> data(N + 1);
  for(int i = 0; i < M; i++) cin >> P[i] >> Y[i];
  for(int i = 0; i < M; i++) {
  	data[P[i]].push_back(Y[i]);
  }
  for(int i = 0; i < N + 1; i++) {
    sort(data[i].begin(), data[i].end());
  }
  for(int i = 0; i < M; i++) {
  	int k = lower_bound(data[P[i]].begin(), data[P[i]].end(), Y[i]) - data[P[i]].begin();
    printf("%06d%06d\n", P[i], k + 1);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: found ':' in nested-name-specifier, expected '::'
   10 |   cin >> N >> M:
      |                ^
      |                ::
a.cc:10:15: error: 'M' is not a class, namespace, or enumeration
   10 |   cin >> N >> M:
      |               ^
a.cc:11:10: error: expected primary-expression before 'int'
   11 |   vector<int> P(M), Y(M);
      |          ^~~
a.cc:13:37: error: 'P' was not declared in this scope
   13 |   for(int i = 0; i < M; i++) cin >> P[i] >> Y[i];
      |                                     ^
a.cc:13:45: error: 'Y' was not declared in this scope
   13 |   for(int i = 0; i < M; i++) cin >> P[i] >> Y[i];
      |                                             ^
a.cc:15:14: error: 'P' was not declared in this scope
   15 |         data[P[i]].push_back(Y[i]);
      |              ^
a.cc:15:30: error: 'Y' was not declared in this scope
   15 |         data[P[i]].push_back(Y[i]);
      |                              ^
a.cc:21:34: error: 'P' was not declared in this scope
   21 |         int k = lower_bound(data[P[i]].begin(), data[P[i]].end(), Y[i]) - data[P[i]].begin();
      |                                  ^
a.cc:21:67: error: 'Y' was not declared in this scope
   21 |         int k = lower_bound(data[P[i]].begin(), data[P[i]].end(), Y[i]) - data[P[i]].begin();
      |                                                                   ^
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.TreeMap;

public class ABC113C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] P = new int[M];
		int[] Y = new int[M];
		HashMap<Integer,TreeMap<Integer,Integer>> localGovernment = new  HashMap<>();
		String[] ans = new String[M];
		
		for (int i = 0; i < M; i++) {
			P[i] = sc.nextInt();
			Y[i] = sc.nextInt();
			localGovernment.computeIfAbsent(P[i], key -> new TreeMap<>()).put(Y[i], i);
		}
		
		localGovernment.forEach((k,v) -> {
			int i = 1; 
			for(Entry<Integer,Integer> tree : v.entrySet()) {
				ans[tree.getValue()] = String.format("%06d", k) + String.format("%06d", i++);
			}
		});
		
		Arrays.stream(ans).forEach(System.out::println);

		sc.close();
	}


}


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

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int N = 0;
		int M = 0;
		Scanner scan = new Scanner(System.in);
		N = scan.nextInt();
		M = scan.nextInt();
		int arr[] = new int[M];
		long arr2[] = new long[M];
		String arr3[] = new String[M];
		int flag[] = new int[N+1];
		
		long order[][] = new long[N+1][M];
		Map<String, Integer> hashmap = new HashMap<String, Integer>();
		int temp = 0;
		for (int i = 0; i < arr.length; i++) {
			arr[i] = scan.nextInt();
			
			arr2[i] = scan.nextInt();
			
			order[arr[i]][flag[arr[i]]++] = arr2[i];
			
			
		}
		for (int i = 0; i < order.length; i++) {
			for (int j = 0; j < order[i].length; j++) {
				Arrays.sort(order[i]);
			}
		}
		
//		for (int i = 0; i < order.length; i++) {
//			for (int j = 0; j < order[i].length; j++) {
//				System.out.print(order[i][j]+" ");
//			}
//			System.out.println();
//		}
		
		String result = "";
		for (int i = 0; i < arr.length; i++) {
			switch (String.valueOf(arr[i]).length()) {
			case 1:
				result = "00000"+arr[i];
				break;
			case 2:
				result = "0000"+arr[i];
				break;
			case 3:
				result = "000"+arr[i];
				break;
			case 4:
				result = "00"+arr[i];
				break;
			case 5:
				result = "0"+arr[i];
				break;
			case 6:
				result = String.valueOf(arr[i]);
				break;
			
			}
			int after = 0;
			int temp1 = 0;
			for (int j = 0; j < order[arr[i]].length; j++) {
				if(0 == order[arr[i]][j]){
					temp1++;
				}else if(arr2[i] == order[arr[i]][j]){
					after = j+1-temp1;
					break;
				}
			}
			
			
			switch (String.valueOf(after).length()) {
			case 1:
				result += "00000"+after;
				break;
			case 2:
				result += "0000"+after;
				break;
			case 3:
				result += "000"+after;
				break;
			case 4:
				result += "00"+after;
				break;
			case 5:
				result += "0"+after;
				break;
			case 6:
				result += String.valueOf(after);
				break;
			
			}
			
			System.out.println(result);
		}
		
	}
}


Compiler output:
Main.java:17: error: cannot find symbol
		Map<String, Integer> hashmap = new HashMap<String, Integer>();
		^
  symbol:   class Map
  location: class Main
Main.java:17: error: cannot find symbol
		Map<String, Integer> hashmap = new HashMap<String, Integer>();
		                                   ^
  symbol:   class HashMap
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,M,i,j;
  cin>>N>>M;
  int P[M]={0};
  int Y[M]={0};
  int C[N]={0};
  int Yrank[M]={0};

  for(i=0;i<M;i++){
Yrank[i]++;
  cin>>P[i]>>Y[i];
    for(j=0;j<i;j++){
    if(P[i]==P[j]){
    
    if(Y[i]<Y[j]){
    Yrank[j]++;
    }else{
Yrank[i]++;
}
    }
  }
  for(i=0;i<M;i++){
 cout<<setw(6)<<setfill('0')<<P[i]<<setw(6)<<setfill('0')<<Yrank[i]<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

#include<stdio.h>
#include<stdlib.h>
typedef struct City{
  int pref;
  int index;
  int order;
  long year;
} City;

int compare(City a, City b);

City CITIES[100001];
int CITY_IN_PREF[100001];
City *CITY_PTR_MAP[100001];

int main(void) {
  int N,M;

  scanf("%d %d", &N, &M);
  for(int i=0;i<M;i++) {
    scanf("%d %ld", &(CITIES[i].pref),&(CITIES[i].year));
    CITIES[i].index = i;
  }
  qsort(CITIES, M, sizeof(City), compare);

  for(int i=0;i<N;i++) CITY_IN_PREF[i] = 0;
  for(int i=0;i<M;i++) {
    CITY_IN_PREF[CITIES[i].pref]++;
    CITIES[i].order = CITY_IN_PREF[CITIES[i].pref];
    CITY_PTR_MAP[CITIES[i].index] = &(CITIES[i]);
  }

  for(int i=0;i<M;i++) {
    City *c = CITY_PTR_MAP[i];
    printf("%06d%06d\n", c->pref, c->order);
  }

  return 0;
}

int compare(City *a, City *b) {
  if(a->year > b->year) {
    return 1;
  }
  return -1;
}

Compiler output:
main.c: In function 'main':
main.c:24:34: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   24 |   qsort(CITIES, M, sizeof(City), compare);
      |                                  ^~~~~~~
      |                                  |
      |                                  int (*)(City,  City)
In file included from main.c:2:
/usr/include/stdlib.h:971:34: note: expected '__compar_fn_t' {aka 'int (*)(const void *, const void *)'} but argument is of type 'int (*)(City,  City)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
main.c: At top level:
main.c:41:5: error: conflicting types for 'compare'; have 'int(City *, City *)'
   41 | int compare(City *a, City *b) {
      |     ^~~~~~~
main.c:10:5: note: previous declaration of 'compare' with type 'int(City,  City)'
   10 | int compare(City a, City b);
      |     ^~~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(){
  long a[2];
  long n;
  int i,j,h;
    for(i=0;i<2;i++){
    scanf("%ld",a+i);
  }

  long b[a[1]];
  long c[a[1]];
  long d[a[1]];//番目
  long *e;
  e = (int *)malloc(sizeof(int) * a[0]*a[1]);
  long *f;
  f = (int *)malloc(sizeof(int) * a[0]*a[1]);
  for(i=0;i<a[0]*a[1];i++){
    e[i]=0;
    f[i]=0;
  }
  long g[a[0]];
    for(i=0;i<a[1];i++){
    g[i]=0;
  }
  for(j=0;j<a[1];j++){
    scanf("%ld",b+j);
    scanf("%ld",c+j);
    e[(b[j]-1)*a[0]+g[b[j]]]=c[j];
    d[j]=1;
    g[b[j]]++;
    for(h=0;h<g[b[j]];h++){
      if(e[(b[j]-1)*a[0]+h]==0){}
      else if(e[(b[j]-1)*a[0]+h]<c[j]){
        d[j]++;
      }
      else if(e[(b[j]-1)*a[0]+h]>c[j]){
        d[h]++;
      }
    }
  }
for(i=0;i<a[1];i++){
  printf("%06d",b[i]);
  printf("%06d\n",d[i]);
}
// for(i=0;i<a[1]*a[0];i++){
//   printf("%d,",e[i]);
// }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: cannot convert 'int*' to 'long int*' in assignment
   17 |   e = (int *)malloc(sizeof(int) * a[0]*a[1]);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |       |
      |       int*
a.cc:19:7: error: cannot convert 'int*' to 'long int*' in assignment
   19 |   f = (int *)malloc(sizeof(int) * a[0]*a[1]);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |       |
      |       int*
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    int N,M;
    cin >> N >> M;

    vector<vector<int>> pre_year(100001);
    vector<int> pre(100001);
    vector<int> year(100001);

    for(int i=0;i<M;i++){
        cin >> pre[i] >> year[i];
        pre_year[pre[i]].push_back(year[i]);
    }
    for(int i=0;i<N;i++){
        sort(pre_year[i].begin(),pre_year[i].end());
    }
    for(int i=0;i<M;i++){
        cout << setfill('0') << right << setw(6) << pre[i];
        auto a=lower_bound(pre_year[pre[i]].begin(),pre_year[pre[i]],year[i]);
        string ab= to_string(a-pre_year[pre[i]].begin()+1);
        cout << setfill('0') << right << setw(6) << ab << endl;
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:27: error: no matching function for call to 'lower_bound(std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   21 |         auto a=lower_bound(pre_year[pre[i]].begin(),pre_year[pre[i]],year[i]);
      |                ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:1530:5: note: candidate: 'template<class _ForwardIterator, class _Tp> _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)'
 1530 |     lower_bound(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1530:5: note:   template argument deduction/substitution failed:
a.cc:21:27: note:   deduced conflicting types for parameter '_ForwardIterator' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'std::vector<int>')
   21 |         auto a=lower_bound(pre_year[pre[i]].begin(),pre_year[pre[i]],year[i]);
      |                ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:1963:5: note: candidate: 'template<class _FIter, class _Tp, class _Compare> _FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare)'
 1963 |     lower_bound(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1963:5: note:   candidate expects 4 arguments, 3 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    int N,M;
    cin >> N >> M;

    vector<vector<int>> pre_year(100001);
    vector<int> pre(100001);
    vector<int> year(100001);

    for(int i=0;i<M;i++){
        cin >> pre[i] >> year[i];
        pre_year[pre[i]].push_back(year[i]);
    }
    for(int i=0;i<N;i++){
        sort(pre_year[i].begin(),pre_year[i].end());
    }
    for(int i=0;i<M;i++){
        cout << setfill('0') << right << setw(6) << pre[i];
        int a=lower_bound(pre_year[pre[i]].begin(),pre_year[pre[i]],year[i]);
        a-=pre_year[pre[i]].begin()+1;
        cout << setfill('0') << right << setw(6) << a << endl;
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: no matching function for call to 'lower_bound(std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   21 |         int a=lower_bound(pre_year[pre[i]].begin(),pre_year[pre[i]],year[i]);
      |               ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:1530:5: note: candidate: 'template<class _ForwardIterator, class _Tp> _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)'
 1530 |     lower_bound(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1530:5: note:   template argument deduction/substitution failed:
a.cc:21:26: note:   deduced conflicting types for parameter '_ForwardIterator' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'std::vector<int>')
   21 |         int a=lower_bound(pre_year[pre[i]].begin(),pre_year[pre[i]],year[i]);
      |               ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:1963:5: note: candidate: 'template<class _FIter, class _Tp, class _Compare> _FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare)'
 1963 |     lower_bound(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1963:5: note:   candidate expects 4 arguments, 3 provided
a.cc:22:10: error: no match for 'operator-=' (operand types are 'int' and '__gnu_cxx::__normal_iterator<int*, std::vector<int> >')
   22 |         a-=pre_year[pre[i]].begin()+1;
      |         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<sstream>
#include<vector>
#include<iterator>
#include<utility>
#include<algorithm>
#include<iomanip>
using namespace std;

string getNumber6digit(int i)
{
	ostringstream oss;
	oss << setfill('0') << setw(6) << i;

	return oss.str();
}

string getNumber(int i, int j)
{
	return getNumber4digit(i) + getNumber4digit(j);
}

int main(void)
{
	int N, M;
	cin >> N >> M;

	vector<vector<pair<int, int>>> city(N, vector<pair<int, int>>());
	for(int i=0; i<M; i++){
		int P, Y;
		cin >> P >> Y;

		P--;

		city[P].push_back(make_pair(Y, i));
	}

	for(int i=0; i<N; i++)
		sort(city[i].begin(), city[i].end());

	vector<pair<int, int>> id(M);
	for(int i=0; i<N; i++){
		for(int j=0; j<city[i].size(); j++){
			id[city[i][j].second] = make_pair(i, j);
		}
	}

	for(int i=0; i<M; i++)
		cout << getNumber(id[i].first+1, id[i].second+1) << endl;


	return 0;
}


Compiler output:
a.cc: In function 'std::string getNumber(int, int)':
a.cc:20:16: error: 'getNumber4digit' was not declared in this scope; did you mean 'getNumber6digit'?
   20 |         return getNumber4digit(i) + getNumber4digit(j);
      |                ^~~~~~~~~~~~~~~
      |                getNumber6digit
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scanner = new Scanner(System.in);
		int p = scanner.nextInt() + 1;
		int counter = scanner.nextInt();
		int[] aArray = new int[counter];
		int[] bArray = new int[counter];
		
		ArrayList<Integer>[] arrayLists = new ArrayList[p];
		for(int i = 0;i<counter;i++) {
			int y = scanner.nextInt();
			int t = scanner.nextInt();
			aArray[i]= y;
			bArray[i]= t; 
			if(arrayLists[y] == null)
				arrayLists[y] = new ArrayList<>(); 
			arrayLists[y].add(t);
		}
		
		for(int i = 0;i<p;i++) {
			if(arrayLists[i]!= null && arrayLists[i].size() > 1 ) {
				Collections.sort(arrayLists[i]);
			}
		}
		
		for(int i = 0;i<counter;i++) {
			int a = aArray[i];
			int b = bArray[i];
			String aString = Integer.toString(a);
			String c = Integer.toString(arrayLists[a].indexOf(b) + 1);
			System.out.println(getZeros(aString.length()) + aString + getZeros(c.length()) + c);
		}
	}

	public static String getZeros(int a) {
		if(a ==1) return "00000";
		if(a == 2) return "0000";
		if(a == 3) return "000";
		if( a == 4) return "00";
		if(a == 5) return "0";
		return "";
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		                      ^
  symbol:   class Scanner
  location: class Main
Main.java:11: error: cannot find symbol
		ArrayList<Integer>[] arrayLists = new ArrayList[p];
		^
  symbol:   class ArrayList
  location: class Main
Main.java:11: error: cannot find symbol
		ArrayList<Integer>[] arrayLists = new ArrayList[p];
		                                      ^
  symbol:   class ArrayList
  location: class Main
Main.java:18: error: cannot find symbol
				arrayLists[y] = new ArrayList<>(); 
				                    ^
  symbol:   class ArrayList
  location: class Main
Main.java:24: error: cannot find symbol
				Collections.sort(arrayLists[i]);
				^
  symbol:   variable Collections
  location: class Main
6 errors
Language: C++

//https://abc113.contest.atcoder.jp/
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<string>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    map < int,int > arr,mens;
    int n,m,x,y;
    cin >> n >> m;
    int p[n];
    for(int i=0; i<m; i++){
        cin >> p[i] >> y;
        arr[p[i]]++;
        mens[p[i]]++;
    }
    int hit;
    for(int i=0; i<m; i++){
        --mens[p[i]];
        hit = arr[p[i]]-mens[p[i]];
        stringstream sl,sr;
        sl  << p[i];
        sr << hit;
        string kiri = sl.str();
        string kanan = sr.str();
        cout << setw(6) << setfill('0') << kiri;
        cout << setw(6) << setfill('0') << kanan <<endl;
 
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:22: error: aggregate 'std::stringstream sl' has incomplete type and cannot be defined
   25 |         stringstream sl,sr;
      |                      ^~
a.cc:25:25: error: aggregate 'std::stringstream sr' has incomplete type and cannot be defined
   25 |         stringstream sl,sr;
      |                         ^~
a.cc:30:17: error: 'setw' was not declared in this scope
   30 |         cout << setw(6) << setfill('0') << kiri;
      |                 ^~~~
a.cc:6:1: note: 'std::setw' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    5 | #include<map>
  +++ |+#include <iomanip>
    6 | #include<string>
a.cc:30:28: error: 'setfill' was not declared in this scope
   30 |         cout << setw(6) << setfill('0') << kiri;
      |                            ^~~~~~~
a.cc:30:28: note: 'std::setfill' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
Language: C++

#include<iostream>
#include <algorithm>
#include<string>
#include <bitset>
#include <vector>
#include <functional>
#include <climits>
#include <iomanip>
#include <utility>
#include <string.h>
#include <cmath>
using namespace std;
using ll = long long;
typedef pair <int, int> pii;

int main()
{

	ll a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0;
	//cout << LONG_MAX << endl;
	//long long n, A[1000000000];
	//ll n, m, q;
	cin >> a;
	cin >> b;
	int p[100005] = {};
	int m[100005] = {};
	int x[100005][100005] = {};
	int memo[100005] = {};
	for (ll i = 1; i <= b; i++)
	{
		cin >> p[i];
		cin >> m[i];
		x[p[i]][memo[p[i]]] = m[i];
		memo[p[i]]++;
	}
	for (ll i = 1; i <= b; i++)
	{
		if (memo[i] != 0)
		{
			sort(x[i], x[i] + memo[i]);
		}
	}
	for (ll i = 1; i <= b; i++)
	{
		printf("%06d", p[i]); // "0012"（ゼロ埋め）
		printf("%06lld\n", ll(ll(lower_bound(x[p[i]], x[p[i]] + memo[p[i]], m[i])) - x[p[i]] + 1)); // "0012"（ゼロ埋め）
		//cout<<lower_bound(x[p[i]], x[p[i]] + memo[i], m[i])<<;

	}
	//cout << x[1][0] << endl;
	//cout << x[1][1] << endl;
	//cout << x[2][0] << endl;




	//cout << e + 1 << endl;
	////std::cout << std::fixed;
	//cout << std::setprecision(20) << << endl;
	//cout << d+1 << endl;
	//cout << "" << endl;

	return 0;
}
//lower_bound(A, A + n, d)//配列のなかからd以上の最小値を探して配列番号を返す関数
//cin >> a;
//cin >> b;
//cin >> c;
//double z[1003];
//for (ll i = 0; i < a; i++)
//{
//	cin >> z[i];
//}
//d = 100000000;
//for (ll i = 0; i < a; i++)
//{
//	if (abs(z[i]*0.006+b-c)<d)
//	{
//		d = abs(z[i] * 0.006 + b - c);
//		e = i;
//	}
//}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:92: error: invalid operands of types 'll' {aka 'long long int'} and 'int [100005]' to binary 'operator-'
   46 |                 printf("%06lld\n", ll(ll(lower_bound(x[p[i]], x[p[i]] + memo[p[i]], m[i])) - x[p[i]] + 1)); // "0012"（ゼロ埋め）
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~
      |                                       |                                                            |
      |                                       ll {aka long long int}                                       int [100005]
Language: Java

mport java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();

		int[] pList = new int[m];
		int[] yList = new int[m];
		Map<Integer, Integer> yearTree = new TreeMap<Integer, Integer>();


		for (int i = 0; i < m; i++) {
			pList[i] = scanner.nextInt();
			yList[i] = scanner.nextInt();
			yearTree.put(yList[i], pList[i]);
		}

		int[] pCounter = new int[n];
		for (int yi : yearTree.keySet()) {
			yearTree.put(yi, ++pCounter[yearTree.get(yi)-1]);
		}

		for (int i = 0; i < m; i++) {
			System.out.println(String.format("%06d%06d", pList[i], yList[i]));
		}

	}

}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Map;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.Scanner;
^
Main.java:3: error: class, interface, enum, or record expected
import java.util.TreeMap;
^
3 errors
Language: C++

#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
using namespace std;
 
int n,u,m,p,y;
 
int gb[10010][3];
 
int main(){
    cin>>n>>m;
    for(int i=0;i<m;i++){
        scanf("%d %d",&gb[i][0],&gb[i][1]);
        gb[i][2]=0;
        for(int e=0;e<m;e++){
            if (gb[e][0]==gb[i][0] and i!=e){
                if(gb[e][1]<gb[i][1]){
                    gb[i][2]+=1;
                }
                else{
                    gb[e][2]+=1;
                }
            }
        }
    }
    for(int i=0;i<m;i++)cout<<setfill('0')<<right<<setw(6)<<gb[i][0]<<setfill('0')<<right<<setw(6)<<gb[i][2]+1<<endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:31: error: 'setfill' was not declared in this scope
   29 |     for(int i=0;i<m;i++)cout<<setfill('0')<<right<<setw(6)<<gb[i][0]<<setfill('0')<<right<<setw(6)<<gb[i][2]+1<<endl;
      |                               ^~~~~~~
a.cc:7:1: note: 'std::setfill' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    6 | #include <iostream>
  +++ |+#include <iomanip>
    7 | using namespace std;
a.cc:29:52: error: 'setw' was not declared in this scope
   29 |     for(int i=0;i<m;i++)cout<<setfill('0')<<right<<setw(6)<<gb[i][0]<<setfill('0')<<right<<setw(6)<<gb[i][2]+1<<endl;
      |                                                    ^~~~
a.cc:29:52: note: 'std::setw' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
Language: C++

#include<iostream>
#include <algorithm>
#include<string>
#include <bitset>
#include <vector>
#include <functional>
#include <climits>
#include <iomanip>
#include <utility>
#include <string.h>
#include <cmath>
using namespace std;
using ll = long long;
typedef pair <int, int> pii;

int main()
{

	ll a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0;
	//cout << LONG_MAX << endl;
	//long long n, A[1000000000];
	//ll n, m, q;
	cin >> a;
	cin >> b;
	int p[100005] = {};
	int m[100005] = {};
	int x[100005][100005] = {};
	int memo[100005] = {};
	for (ll i = 1; i <= b; i++)
	{
		cin >> p[i];
		cin >> m[i];
		x[p[i]][memo[p[i]]] = m[i];
		memo[p[i]]++;
	}
	for (ll i = 1; i <= b; i++)
	{
		if (memo[i] != 0)
		{
			sort(x[i], x[i] + memo[i]);
		}
	}
	for (ll i = 1; i <= b; i++)
	{
		printf("%06d", p[i]); // "0012"（ゼロ埋め）
		printf("%06lld\n", ll(ll(lower_bound(x[p[i]], x[p[i]] + memo[p[i]], m[i])) - x[p[i]] + 1)); // "0012"（ゼロ埋め）
																								 //cout<<lower_bound(x[p[i]], x[p[i]] + memo[i], m[i])<<;

	}
	//cout << x[1][0] << endl;
	//cout << x[1][1] << endl;
	//cout << x[2][0] << endl;




	//cout << e + 1 << endl;
	////std::cout << std::fixed;
	//cout << std::setprecision(20) << << endl;
	//cout << d+1 << endl;
	//cout << "" << endl;

	return 0;
}
//lower_bound(A, A + n, d)//配列のなかからd以上の最小値を探して配列番号を返す関数
//cin >> a;
//cin >> b;
//cin >> c;
//double z[1003];
//for (ll i = 0; i < a; i++)
//{
//	cin >> z[i];
//}
//d = 100000000;
//for (ll i = 0; i < a; i++)
//{
//	if (abs(z[i]*0.006+b-c)<d)
//	{
//		d = abs(z[i] * 0.006 + b - c);
//		e = i;
//	}
//}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:92: error: invalid operands of types 'll' {aka 'long long int'} and 'int [100005]' to binary 'operator-'
   46 |                 printf("%06lld\n", ll(ll(lower_bound(x[p[i]], x[p[i]] + memo[p[i]], m[i])) - x[p[i]] + 1)); // "0012"（ゼロ埋め）
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~
      |                                       |                                                            |
      |                                       ll {aka long long int}                                       int [100005]
Language: Java

import java.util.*;
import java.awt.*;

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

        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] p = new int[m];
        int[] y = new int[m];
        int[][] cop = new int[2][m];
        for (int i = 0; i < m; i++) {
            p[i] = sc.nextInt();
            y[i] = sc.nextInt();
            cop[0][i] = p[i];
            cop[1][i] = y[i];
        }

        Arrays.sort(cop, new Comparator<int[]>(){
            @Override
            public int compare(int[] o1, int[] o2) {
                return Integer.compare(o1[1], o2[1]);
            }
        });

        int[] count = new int[n];
        int[] num = new int[1000000001];

        for (int i = 0; i < m; i++) {
            num[cop[1][i]-1] = ++count[cop[0][i]-1];
        }

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < 5 - p[i]/10; j++) {
                System.out.print("0");
            }
            System.out.print(p[i]);
            for (int j = 0; j < 5 - (num[y[i]-1]1)/10; j++) {
                System.out.print("0");
            }
            System.out.print(num[y[i]-1]);
            System.out.println(" ");
        }

    }
}


Compiler output:
Main.java:39: error: ')' expected
            for (int j = 0; j < 5 - (num[y[i]-1]1)/10; j++) {
                                                ^
Main.java:39: error: illegal start of expression
            for (int j = 0; j < 5 - (num[y[i]-1]1)/10; j++) {
                                                  ^
Main.java:39: error: ';' expected
            for (int j = 0; j < 5 - (num[y[i]-1]1)/10; j++) {
                                                          ^
3 errors
Language: C++

#include <iostream>
#include <stdio.h>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

uint32_t main() {
		uint32_t N;
		uint32_t M;
		cin >> N >> M;
		vector<vector<uint32_t>> P;
		vector<uint32_t> number;

		P.resize(M + 5);
		number.resize(M + 5);

		for (uint32_t m = 0; m < M; ++m) {
			uint32_t k1, k2;
			cin >> k1 >> k2;
			P[m].resize(2);
			P[m][0] = k1;
			P[m][1] = k2;
		}
		vector<uint32_t> p;
		p.resize(M + 5);
		vector<string> s;
		s.resize(M + 5);
		uint32_t kk = 0;
		uint32_t f = 0;
		for (uint32_t m = 0; m < M; ++m) {
			p[m] = P[m][1];
		}
		sort(p.begin(), p.end());
		vector<uint32_t> l;
		l.resize(N + 1);
		for (uint32_t k = 0; k <= N; ++k) {
			l[k] = 1;
		}
		bool flags = true;
		while (flags) {
			for (uint32_t k = 0; k < M; ++k) {
				if (P[k][1] == p[f]) {
					char ss[255];
					sprintf(ss, "%06d%06d", P[k][0], l[P[k][0]]);
					++l[P[k][0]];
					s[k] = ss;
					++f;
				}
				if (f == (M - 1)) { flags = false; break; }
			}
		}
		for (uint32_t k = 0; k < M; ++k) {
			cout << s[k].c_str() << endl;
		}
	return 0;
}

Compiler output:
a.cc:8:1: error: 'uint32_t' does not name a type
    8 | uint32_t main() {
      | ^~~~~~~~
a.cc:6:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    5 | #include <algorithm>
  +++ |+#include <cstdint>
    6 | using namespace std;
Language: Java

import java.util.Scanner;

class Main {
	static void swap(int[][] a, int b, int c){
		int t1 = a[b][0];
		int t2 = a[b][1];
		a[b][0] = a[c][0];
		a[b][1] = a[c][1];
		a[c][0] = t1;
		a[c][1] = t2;
	}

	static void leftsort(int[][] a, int left, int right){
		int pl = left;
		int pr = right;
		int x = a[(pl + pr) / 2][0];
		do {
			while (a[pl][0] < x)
				pl = pl + 1;
			while (a[pr][0] > x)
				pr = pr - 1;
			if (pl <= pr)
				swap(a, pl++, pr--);
		} while (pl <= pr);
		if (left < pr)
			leftsort(a, left, pr);
		if (pr < right)
			leftsort(a, pl, right);
	}

	tatic void rightsort(int[][] a, int left, int right){
		int pl = left;
		int pr = right;
		int x = a[(pl + pr) / 2][1];
		do {
			while (a[pl][1] < x)
				pl = pl + 1;
			while (a[pr][1] > x)
				pr = pr - 1;
			if (pl <= pr)
				swap(a, pl++, pr--);
		} while (pl <= pr);
		if (left < pr)
			rightsort(a, left, pr);
		if (pr < right)
			rightsort(a, pl, right);
	}

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int M = stdIn.nextInt();
		int[][] P = new int[M][2];
		int[][] id = new int[M][12];
		for (int i = 0; i < M; i++) {
		 	P[i][0] = stdIn.nextInt();
		 	P[i][1] = stdIn.nextInt();
		 } 
		for (int i = 0; i < M; j++) {
			for (int j = 0; i < 12; i++) {
				id[j][i] = 0;	
			}
		}
		int s, t;
		for (int i = 0; i < M; i++) {
			t = P[i][0];
			for (int j = 0; j < 6; j++) {
				s = t;
				s = s % Math.pow(10, 6 - j);
				if (j == 5)
					id[i][j] = s;
				else
					id[i][j] = s / Math.pow(10, 5 - j);
			}
		}
		leftsort(P, 0, M - 1);
		int u = P[0][0];
		int v = 0;
		int[] equal = new int[M]; 
		for (int i = 0; i < M; i++) {
			equal[i] = 0;
		}
		for (int i = 0; i < M; i++) {
			if (P[i][0] > u) { 
				v = v + 1;
				equal[v] = i;
				u = P[i][0];
			}
		}
		int dif,t3, s3;
		for (int i = 0; i < M; i++) {
			int left = equal[i];
			int right = equal[i + 1];
			if (left < right) {
				rightsort(P, left, right - 1);
				dif = right - left;
				for (int j = left; j < right; j++) {
					t3 = dif;
					for (int k = 6; k < 12; k++) {
						s3 = t3;
						s3 = s3 % Math.pow(10, 12 - k);
						if (k == 11)
							id[j][k] = s3;
						else
							id[j][k] = s3 / Math.pow(10, 11 - k);
					}
				}
			}
			else
				id[i][11] = 1;
		}
		for (int i = 0; i < M; i++) {
			for (int j = 0; j < 12; j++) {
				System.out.print(id[i][j]);
			}
			System.out.println();
			
		}
	}
}

Compiler output:
Main.java:31: error: <identifier> expected
	tatic void rightsort(int[][] a, int left, int right){
	     ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  // freopen("input.txt", "r", stdin);

  int n, m;
  cin >> n >> m;
  vector<int> p(m), y(m);
  for (int i = 0; i < m; ++i) {
    cin >> p[i] >> y[i];
  }

  vector<vector<int>> a(n, vector<int>(0));
  for (int i = 0; i < m; ++i) {
    a[p[i]-1].push_back(y[i]);
  }

  for (int i = 0; i < n; ++i) {
    sort(a[i].begin(), a[i].end());
  }

  for (int i = 0; i < m; ++i) {
    printf("%06d", p[i]);
    int result = find(a[p[i]-1].begin(), a[p[i]-1].end(), y[i]);
    printf("%06d\n", result + 1);
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:22: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   25 |     int result = find(a[p[i]-1].begin(), a[p[i]-1].end(), y[i]);
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C++

#include<iostream>
#include<cstring>
#include<queue>
#include<vector>
#include<cmath>
using namespace std;

main(){
  int n,m,i,y,p1;
  cin >> n >> m;
  double i2,i3;
  char id[12][m];
  int k[n];
  vector<int> p,num;
  priority_queue<int,vector<int>,greater<int>> box;
  for (i=1;i<=m;i++){
    cin >> p1 >> y;
    box.push(y);
    p[y]=p1;
    num[y]=i;
  }
  while (!box.empty()){
    p1=box.top();
    for (i2=1;1;i2++) if (k[p[p1]]+1/pow(10,i2)<1) break;
    for (i3=0;i3<i2;i3++){
      char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      k[p[p1]]+1/=pow(10,i3+1);
    }
    for (i2=1;1;i2++) if (p[p1]/pow(10,i2)<1) break;
    for (i3=0;i3<i2;i3++){
      char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      p[p1]/=pow(10,i3+1);
    }
    box.pop();
    k[p[p1]]++;
  }
  for (i=1;i<m;i++) cout << char[12][i] << endl;
}


Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:26:12: error: expected identifier before numeric constant
   26 |       char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      |            ^~
a.cc:26:12: error: expected ']' before numeric constant
   26 |       char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      |            ^~
      |            ]
a.cc:26:11: error: structured binding declaration cannot have type 'char'
   26 |       char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      |           ^
a.cc:26:11: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:26:11: error: empty structured binding declaration
a.cc:26:18: error: expected initializer before '[' token
   26 |       char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      |                  ^
a.cc:27:15: error: lvalue required as left operand of assignment
   27 |       k[p[p1]]+1/=pow(10,i3+1);
      |       ~~~~~~~~^~
a.cc:31:12: error: expected identifier before numeric constant
   31 |       char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      |            ^
a.cc:31:12: error: expected ']' before numeric constant
   31 |       char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      |            ^
      |            ]
a.cc:31:11: error: structured binding declaration cannot have type 'char'
   31 |       char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      |           ^
a.cc:31:11: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:31:11: error: empty structured binding declaration
a.cc:31:17: error: expected initializer before '[' token
   31 |       char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      |                 ^
a.cc:37:29: error: expected primary-expression before 'char'
   37 |   for (i=1;i<m;i++) cout << char[12][i] << endl;
      |                             ^~~~
Language: C++

import numpy as np

N, M = (int(i) for i in input().split())  


P = []
Y = []

for i in range(M):
    a, b = (int(i) for i in input().split())  
    P.append(a)
    Y.append(b)

#P = np.array(P)
Y = np.array(Y)

inds = np.argsort(Y)


result = {}
result2 = {}

for num, ind in enumerate(inds):
    if P[i] not in result:
        result[P[i]] = [ind]
    else:
        result[P[i]].append(ind)

    result2[ind] = "{:0=6}".format(P[i]) + "{:0=6}".format(P.index(P[i]))


for key in range(M):
    print(result2[key])






Compiler output:
a.cc:14:2: error: invalid preprocessing directive #P
   14 | #P = np.array(P)
      |  ^
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:21:1: error: 'result2' does not name a type
   21 | result2 = {}
      | ^~~~~~~
a.cc:23:1: error: expected unqualified-id before 'for'
   23 | for num, ind in enumerate(inds):
      | ^~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

uint32_t main() {
	while (1) {
		uint32_t N;
		uint32_t M;
		cin >> N >> M;
		vector<vector<uint32_t>> P;
		vector<uint32_t> number;

		P.resize(M + 5);
		number.resize(M + 5);

		for (uint32_t m = 0; m < M; ++m) {
			uint32_t k1, k2;
			cin >> k1 >> k2;
			P[m].resize(2);
			P[m][0] = k1;
			P[m][1] = k2;
		}
		vector<uint32_t> p;
		p.resize(M + 5);
		vector<string> s;
		s.resize(M + 5);
		uint32_t kk = 0;
		uint32_t f = 0;
		for (uint32_t m = 0; m < M; ++m) {
			p[m] = P[m][1];
		}
		sort(p.begin(), p.end());
		vector<uint32_t> l;
		l.resize(N + 1);
		for (uint32_t k = 0; k <= N; ++k) {
			l[k] = 1;
		}
		bool flags = true;
		while (flags) {
			for (uint32_t k = 0; k < M; ++k) {
				if (P[k][1] == p[f]) {
					char ss[255];
					sprintf(ss, "%06d%06d", P[k][0], l[P[k][0]]);
					++l[P[k][0]];
					s[k] = ss;
					++f;
				}
				if (f == (M - 1)) { flags = false; break; }
			}
		}
		for (uint32_t k = 0; k < M; ++k) {
			cout << s[k].c_str() << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc:8:1: error: 'uint32_t' does not name a type
    8 | uint32_t main() {
      | ^~~~~~~~
a.cc:6:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    5 | #include <algorithm>
  +++ |+#include <cstdint>
    6 | using namespace std;
Language: C++

#include <vector>
#include <array>
#include <algorithm>
#include <string>
#include <cmath>
 
using namespace std;
 
typedef long long ll;
 
struct city {
	int ans1;
	int ans2;
};
 
int main() {
	ll N, M;
	cin >> N >> M;
	vector<ll> P(M), Y(M), ans(M), T(N, 1);
	vector<city> C(M);
 
	for (int i = 0; i < M; i++) {
		cin >> P[i] >> Y[i];
	}
 
	ll max = *(max_element(Y.begin(), Y.end()));
 
	//古いやつから消していく
	for (int i = 0; i < M; i++) {
		vector<ll>::iterator iter = min_element(Y.begin(), Y.end());
		int index = distance(Y.begin(), iter);
//		cout << "index " << index << " " << P[index] << " " << Y[index] << endl;
		C[index].ans1 = P[index];
//		cout << C[index].ans1 << endl;
		C[index].ans2 = T[P[index]];
		T[(P[index])]++;
		Y[index] = max + 1;
	}
 
	for (int i = 0; i < M; i++) {
		printf("%06d%06d\n", C[i].ans1, C[i].ans2);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'cin' was not declared in this scope
   18 |         cin >> N >> M;
      |         ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include <cmath>
  +++ |+#include <iostream>
    6 |
Language: C++

#include<iostream>
#include<cstring>
#include<queue>
#include<vector>
#include<cmath>
using namespace std;

main(){
  int n,m,i,y,p1;
  cin >> n >> m;
  double i2,i3;
  char id[12][m];
  int k[n];
  vector<int> p,num;
  priority_queue<int,vector<int>,greater<int>> box;
  for (i=1;i<=m,i++){
    cin >> p1 >> y;
    box.push(y);
    p[y]=p1;
    num[y]=i;
  }
  while (!box.empty()){
    p1=box.top();
    for (i2=1;1;i2++) if (k[p[p1]+1/pow(10,i2)<1) break;
    for (i3=0;i3<i2;i3++){
      char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      k[p[p1]]+1/=pow(10,i3+1);
    }
    for (i2=1;1;i2++) if (p[p1]/pow(10,i2)<1) break;
    for (i3=0;i3<i2;i3++){
      char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      p[p1]/=pow(10,i3+1);
    }
    box.pop();
    k[p[p1]]++;
  }
  for (i=1;i<m;i++) cout << char[12][i] << endl;
}


Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:16:20: error: expected ';' before ')' token
   16 |   for (i=1;i<=m,i++){
      |                    ^
      |                    ;
a.cc:24:49: error: expected ']' before ')' token
   24 |     for (i2=1;1;i2++) if (k[p[p1]+1/pow(10,i2)<1) break;
      |                                                 ^
      |                                                 ]
a.cc:26:12: error: expected identifier before numeric constant
   26 |       char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      |            ^~
a.cc:26:12: error: expected ']' before numeric constant
   26 |       char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      |            ^~
      |            ]
a.cc:26:11: error: structured binding declaration cannot have type 'char'
   26 |       char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      |           ^
a.cc:26:11: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:26:11: error: empty structured binding declaration
a.cc:26:18: error: expected initializer before '[' token
   26 |       char[12-i3][num[p1]]=k[p[p1]]+1%pow(10,i3+1);
      |                  ^
a.cc:27:15: error: lvalue required as left operand of assignment
   27 |       k[p[p1]]+1/=pow(10,i3+1);
      |       ~~~~~~~~^~
a.cc:31:12: error: expected identifier before numeric constant
   31 |       char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      |            ^
a.cc:31:12: error: expected ']' before numeric constant
   31 |       char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      |            ^
      |            ]
a.cc:31:11: error: structured binding declaration cannot have type 'char'
   31 |       char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      |           ^
a.cc:31:11: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:31:11: error: empty structured binding declaration
a.cc:31:17: error: expected initializer before '[' token
   31 |       char[6-i3][num[p1]]=p[p1]%pow(10,i3+1);
      |                 ^
a.cc:37:29: error: expected primary-expression before 'char'
   37 |   for (i=1;i<m;i++) cout << char[12][i] << endl;
      |                             ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <iomanip>
using namespace std;

int main(int argc, char const *argv[])
{
    int n, m;
    cin >> n >> m;
    vector<pair<int, int>> pys;
    map<int, vector<int>> s2ys;
    int p, y;
    for (int i=0; i<m; i++) {
        cin >> p >> y;
        pys.push_back(make_pair(p, y));
        s2ys[p].push_back(y);
    }
    
    for (auto i = s2ys.begin(); i != s2ys.end(); i++) {
        sort(i->second.begin(), i->second.end());
    }

    for (int i=0; i<m; i++) {
        int p = pys[i].first;
        int y = pys[i].second;
        for (int j=0; j<s2ys[p].size(); j++) {
            if (y == s2ys[p][j]) {
                cout << setfill('0') << setw(6) << p << setfill('0') << setw(6) << j + 1 << endl;
            }
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   21 |         sort(i->second.begin(), i->second.end());
      |         ^~~~
      |         short