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

import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		List<TreeMap> mapList = new ArrayList<TreeMap>();
		int[][] valAry = new int[M][2];
		
		for(int i = 0; i < N ; i++){
			TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
			mapList.add(map);
		}
		for(int i = 0; i < M ; i++){
			int P = sc.nextInt();
			int Y = sc.nextInt();
			mapList.get(P-1).put(Y, i);
			valAry[i][0] = P;
			valAry[i][1] = Y;
		}
		for(Map map : mapList){
			Iterator<Map.Entry<Object, Object>> it = map.entrySet().iterator();
			int i = 1;
			while (it.hasNext()) {
				Map.Entry<Object, Object> entry = it.next();
				entry.setValue(i);
				i++;
			}
			System.out.println();
		}
		for(int i = 0; i < M ; i++){
			System.out.println(format(valAry[i][0])+format(mapList.get(valAry[i][0]-1).get(valAry[i][1])));
		}
		
	}
	
	public static String format(int val){
		if(val > 99999) return "" + val;
		else if(val > 9999) return "0" + val;
		else if(val > 999) return "00" + val;
		else if(val > 99) return "000" + val;
		else if(val > 9) return "0000" + val;
		else if(val > 0) return "00000" + val;
		else return "";
	}
}

Compiler output:
Main.java:41: error: incompatible types: Object cannot be converted to int
			System.out.println(format(valAry[i][0])+format(mapList.get(valAry[i][0]-1).get(valAry[i][1])));
			                                                                              ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	int N, M;
	cin >> N >> M;

	tuple<int,long long,int> ID[M];
	for (int i = 0; i < M; i++) {
		long long p, y;
		cin >> p >> y;
		ID[i]=make_tuple(y, p, i);
	}
	sort(ID, ID + M);
	int P[N] = {};
	for (int i = 0; i < M; i++) {
		long long a, b, c;
		tie(a, b, c) = ID[i];
		P[b]++;
		cout << setw(6) <<setfill('0')<<p;
		cout << setw(6) << setfill('0') << P[b] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:49: error: 'p' was not declared in this scope
   19 |                 cout << setw(6) <<setfill('0')<<p;
      |                                                 ^
Language: Java

public class Main {

	static int N, M;
	static int[][] TABLE;
	static int[] PRECITY;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		N = sc.nextInt();
		M = sc.nextInt();
		TABLE = new int[M][2];
		for (int i = 0; i < M; i++) {
			TABLE[i][0] = sc.nextInt();
			TABLE[i][1] = sc.nextInt();
		}
		PRECITY = new int[N];
		for (int i = 0; i < M; i++) {
			int preNo = TABLE[i][0];
			PRECITY[preNo - 1] += 1;
		}
		for (int i = 0; i < N; i++) {
			int[] tempArr = new int[PRECITY[i]];
			if (tempArr.length == 0) {
				continue;
			}
			int arrTop = 0;
			for (int j = 0; j < M; j++) {
				if (TABLE[j][0] == i + 1) {
					tempArr[arrTop++] = TABLE[j][1];
				}
				if (arrTop == PRECITY[i]) {
					continue;
				}
			}
			Arrays.sort(tempArr);
			for (int j = 0; j < M; j++) {
				int t1 = getIndex(TABLE[j][1], tempArr);
				if (t1 != -1)
					TABLE[j][1] = t1;
				if (t1 == tempArr.length - 1)
					continue;
			}

		}
		for (int i = 0; i < TABLE.length; i++) {
			System.out.println(forMatSize("" + TABLE[i][0]) + forMatSize("" + TABLE[i][1]));
		}
	}

	public static String forMatSize(String str) {
		int len = ("" + str).length();
		for (int i = 0; i < 6 - len; i++) {
			str = "0" + str;
		}
		return str;
	}

	public static int getIndex(int num, int[] arr) {
		for (int i = 0; i < arr.length; i++) {
			if (num == arr[i])
				return i + 1;
		}
		return -1;
	}

}


Compiler output:
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:35: error: cannot find symbol
			Arrays.sort(tempArr);
			^
  symbol:   variable Arrays
  location: class Main
3 errors
Language: Java

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
import java.util.Map.Entry;

public class Main {
	static int N, M;

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		N = sc.nextInt();
		M = sc.nextInt();
		Map<Integer, Integer> ml = new LinkedHashMap<Integer, Integer>();
		Map<Integer, String> result = new LinkedHashMap<Integer, String>();
		Map<Integer, Integer> m = new TreeMap<Integer, Integer>();
		for (int i = 0; i < M; i++) {
			int pi = sc.nextInt();
			int yi = sc.nextInt();
			ml.put(yi, pi);
			m.put(yi, pi);
		}
		int count;
		String xiaquid, cityorder, cityid;

		for (int i = 1; i <= N; i++) {
			count = 0;
			for (Map.Entry<Integer, Integer> entry : m.entrySet()) {
				int v = entry.getValue();
				if (i == v) {
					count++;
					xiaquid = String.format("%06d", Integer.valueOf(v));
					cityorder = String.format("%06d", Integer.valueOf(count));
					cityid = xiaquid + cityorder;
					result.put(entry.getKey(), cityid);
				}

			}

		}
		for (Map.Entry<Integer, Integer> entry : ml.entrySet()) {
			for (Map.Entry<Integer, String> entry2 : result.entrySet()) {
				if (entry.getKey() == entry2.getKey())
					System.out.println(entry2.getValue());
			}
		}

	}



Compiler output:
Main.java:49: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;


public class ID2 {
	static int N,M;
	static int[][] arr;
	static boolean[] visited;
	static int count;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		N=sc.nextInt();
		M=sc.nextInt();
		arr=new int[N+1][100];
		visited=new boolean[N+1];
		int[] orginal=new int[M];
		Map<Integer, String> result = new LinkedHashMap<Integer, String>();

		for(int i=0;i<M;i++) {
			int x=sc.nextInt();
			int y=sc.nextInt();
			orginal[i]=y;
			arr[x][y]=1;
			}
		
		for(int i=1;i<=N;i++) {
			visited[i]=true;
			count=1;
			for(int j=1;j<100;j++) {
				if(arr[i][j]==1) {
					String xiaquid = String.format("%06d",Integer.valueOf(i));
					String cityorder = String.format("%06d",Integer.valueOf(count));
					String cityid=xiaquid+cityorder;
					result.put(j, cityid);
					count++;
				}
			}
		}
		for(int i=0;i<M;i++) {
			System.out.println(result.get(orginal[i]));
			}
		}
}


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

public class Main{
	static int N,M;
	static int[][] arr;
	static boolean[] visited;
	static int count;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		N=sc.nextInt();
		M=sc.nextInt();
		arr=new int[N+1][100];
		visited=new boolean[N+1];
		int[] orginal=new int[M];
		Map<Integer, String> result = new LinkedHashMap<Integer, String>();

		for(int i=0;i<M;i++) {
			int x=sc.nextInt();
			int y=sc.nextInt();
			orginal[i]=y;
			arr[x][y]=1;
			}
		
		for(int i=1;i<=N;i++) {
			visited[i]=true;
			count=1;
			for(int j=1;j<100;j++) {
				if(arr[i][j]==1) {
					String xiaquid = String.format("%06d",Integer.valueOf(i));
					String cityorder = String.format("%06d",Integer.valueOf(count));
					String cityid=xiaquid+cityorder;
					result.put(j, cityid);
					count++;
				}
			}
		}
		for(int i=0;i<M;i++) {
			System.out.println(result.get(orginal[i]));
			}
		}
}

Compiler output:
Main.java:8: error: cannot find symbol
		Scanner sc=new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc=new Scanner(System.in);
		               ^
  symbol:   class Scanner
  location: class Main
Main.java:14: error: cannot find symbol
		Map<Integer, String> result = new LinkedHashMap<Integer, String>();
		^
  symbol:   class Map
  location: class Main
Main.java:14: error: cannot find symbol
		Map<Integer, String> result = new LinkedHashMap<Integer, String>();
		                                  ^
  symbol:   class LinkedHashMap
  location: class Main
4 errors
Language: Java

import java.util.Arrays;
import java.util.Comparator;
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();
		sc.nextLine();
		int[][] arr = new int[m][4];
		for (int i = 0; i < m; i++) {
			arr[i][0] = sc.nextInt();
			arr[i][1] = sc.nextInt();
			arr[i][2] = i;
			
			sc.nextLine();
		}
		sort(arr,1);
		int[] count = new int[n+1];
		for(int i=0; i<m; i++){
			arr[i][3] = count[arr[i][0]]+1;
			count[arr[i][0]]++;
		}
		sort(arr,2);
		for(int i=0; i<m; i++){
			System.out.println(addZeroForNum(String.valueOf(arr[i][0])) + addZeroForNum(String.valueOf(arr[i][3])));
		}
	}

	public static void sort(int[][] ob, final int order) {
		Arrays.sort(ob, new Comparator<Object>() {
			public int compare(Object o1, Object o2) {
				int[] one = (int[]) o1;
				int[] two = (int[]) o2;
				if (one[order] > two[order]) {
					return 1;
				} else if (one[order] < two[order]) {
					return -1;
				} else {
					return 0;
				}
			}
		});
	}

	public static String addZeroForNum(String str) {
		int strLen = str.length();
		if (strLen < 6) {
			while (strLen < 6) {
				StringBuffer sb = new StringBuffer();
				sb.append("0").append(str);
				str = sb.toString();
				strLen = str.length();
			}
		}
		return str;
	}

Compiler output:
Main.java:58: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

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

public class MainB {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		sc.nextLine();
		int[][] arr = new int[m][4];
		for (int i = 0; i < m; i++) {
			arr[i][0] = sc.nextInt();
			arr[i][1] = sc.nextInt();
			arr[i][2] = i;
			
			sc.nextLine();
		}
		sort(arr,1);
		int[] count = new int[n+1];
		for(int i=0; i<m; i++){
			arr[i][3] = count[arr[i][0]]+1;
			count[arr[i][0]]++;
		}
		sort(arr,2);
		for(int i=0; i<m; i++){
			System.out.println(addZeroForNum(String.valueOf(arr[i][0])) + addZeroForNum(String.valueOf(arr[i][3])));
		}
	}

	public static void sort(int[][] ob, final int order) {
		Arrays.sort(ob, new Comparator<Object>() {
			public int compare(Object o1, Object o2) {
				int[] one = (int[]) o1;
				int[] two = (int[]) o2;
				if (one[order] > two[order]) {
					return 1;
				} else if (one[order] < two[order]) {
					return -1;
				} else {
					return 0;
				}
			}
		});
	}

	public static String addZeroForNum(String str) {
		int strLen = str.length();
		if (strLen < 6) {
			while (strLen < 6) {
				StringBuffer sb = new StringBuffer();
				sb.append("0").append(str);
				str = sb.toString();
				strLen = str.length();
			}
		}
		return str;
	}

Compiler output:
Main.java:58: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include<iostream>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<map>

using namespace std;

int main()
{
    int N = 0;
    int M = 0;
    cin >> N >> M;

    int P[1000000] = {};
    int Y[1000000] = {};
    vector<int> yd[1000001];

    for (int i = 0; i < M; i++) {
        cin >> P[i] >> Y[i];
        yd[P[i]].push_back(Y[i]);
    }

    for (int i = 0; i < N; i++) {
        sort(yd[i + 1].begin(), yd[i + 1].end());
    }

    for (int i = 0; i < M; i++) {
        int x;
        x = int(lower_bound(yd[P[i]].begin(), yd[P[i]].end(), Y[i]) - yd[P[i]].begin() + 1);
        printf("%012lld\n", (long long)P[i] * 1000000 + x);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   25 |         sort(yd[i + 1].begin(), yd[i + 1].end());
      |         ^~~~
      |         sqrt
Language: Java

import java.*;
import java.util.Scanner;
import java.util.ArrayList;


public class Main{
	static int N,M;
	static String[] List;
	static String[][] city;
	static String[] Answer;
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner ss = new Scanner(System.in);
		N = ss.nextInt();
		M = ss.nextInt();
		ArrayList<String[]> strArray = new ArrayList<String[]> ();
		List = new String[M];
		city = new String[M][4];
		for (int i = 0; i < M; i++) {
			city[i][0] = ss.next();
			city[i][1] = ss.next();	
			String aa = Integer.toString(i);
			city[i][3] =aa;
		}
		Maints = new Main();
		ts.makesort(city , 1);
		
		city[0][2]="1";
		for (int i = 1; i < M; i++) {
			int j;
			for ( j = i-1; j >= 0; j--) {
				if(city[i][0].compareTo(city[j][0])!=0)continue;
				if(city[i][0].compareTo(city[j][0])==0) {
					int cnt = Integer.parseInt(city[j][2]);
					cnt++;
					String f = Integer.toString(cnt);
					city[i][2]= f;
					break;
				}
			}
			if(j<0)city[i][2] = "1";
		}
		
		for (int i = 0; i < M; i++) {
			String x = ts.format(city[i][0]);
			city[i][0] = x;
			String y = ts.format(city[i][2]);
			city[i][2] = y;
		}
		ts.makesort(city , 3);
		for (int i = 0; i < M; i++) {
			System.out.print(city[i][0]+city[i][2]);
			System.out.println();

		}
		
	}
	
	private void makesort(String[][] s, int x) {
		for (int j = 0; j < s.length-1; j++) {
			for (int i = 0; i < s.length - 1-j; i++) {
				String[] ss;
				if (s[i][x].compareTo(s[i + 1][x]) > 0) {
					ss = s[i];
					s[i] = s[i + 1];
					s[i + 1] = ss;
				}
			}
		}
		
	}
	public String format(String a) {
		int len = a.length();
		int n = 6-len;
		for (int i = 0; i < n; i++) {
			StringBuilder sb = new StringBuilder(a);
			sb.insert(0, "0");
			a = sb.toString();
		}
		return a;
		
	}


}


Compiler output:
Main.java:1: error: package java does not exist
import java.*;
^
Main.java:26: error: cannot find symbol
		Maints = new Main();
		^
  symbol:   variable Maints
  location: class Main
Main.java:27: error: cannot find symbol
		ts.makesort(city , 1);
		^
  symbol:   variable ts
  location: class Main
Main.java:46: error: cannot find symbol
			String x = ts.format(city[i][0]);
			           ^
  symbol:   variable ts
  location: class Main
Main.java:48: error: cannot find symbol
			String y = ts.format(city[i][2]);
			           ^
  symbol:   variable ts
  location: class Main
Main.java:51: error: cannot find symbol
		ts.makesort(city , 3);
		^
  symbol:   variable ts
  location: class Main
6 errors
Language: Java

public class Main
{
	
	private static int N;//辖区数
	private static int M;//城市数
	private static int area[];//辖区数组
	private static int city[];//城市数组
	private static ArrayList<Integer> p[];
	private static Scanner sc;
	public static void main(String[] args)
	{
		sc = new Scanner(System.in);
		N = sc.nextInt();
		M = sc.nextInt();
		
		area = new int[M];
		city = new int[M];
		p = new ArrayList[M];
		for(int i=0;i<M;i++){
			area[i] = sc.nextInt();
			city[i] = sc.nextInt();
			if(p[area[i]]==null) p[area[i]] = new ArrayList<Integer>();
			p[area[i]].add(city[i]);
		}
		
		for(int j=1;j<=N;j++){
			Collections.sort(p[j]);
		}
		for(int k=0;k<M;k++){
			int pos = p[area[k]].indexOf(city[k])+1;
			String str = String.format("%06d%06d", area[k],pos);
			System.out.println(str);
		}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
	private static ArrayList<Integer> p[];
	               ^
  symbol:   class ArrayList
  location: class Main
Main.java:9: error: cannot find symbol
	private static Scanner sc;
	               ^
  symbol:   class Scanner
  location: class Main
Main.java:12: error: cannot find symbol
		sc = new Scanner(System.in);
		         ^
  symbol:   class Scanner
  location: class Main
Main.java:18: error: cannot find symbol
		p = new ArrayList[M];
		        ^
  symbol:   class ArrayList
  location: class Main
Main.java:22: error: cannot find symbol
			if(p[area[i]]==null) p[area[i]] = new ArrayList<Integer>();
			                                      ^
  symbol:   class ArrayList
  location: class Main
Main.java:27: error: cannot find symbol
			Collections.sort(p[j]);
			^
  symbol:   variable Collections
  location: class Main
6 errors
Language: C++

#include <iostream>
using namespace std;
int main(void) {
	// Your code here!
	int N, M;
	cin >> N;
	cin >> M;
	int *P, *Y;
	P = new int[M];
	Y = new int[M];
	for (int i = 0; i < M; i++) {
		cin >> P[i];
		cin >> Y[i];
	}

	int *pNum;
	pNum = new int[N * M];
	for (int i = 0; i < N*M; i++)pNum[i] = 3;
	for (int i = 0; i < M; i++) {
		for (int j = 0; j < M; j++) {
			if (pNum[(P[i] - 1) * M + j] == 3 ? 1 :Y[pNum[(P[i] - 1) * M + j]] > Y[i]) {
				for (int k = M - 1; k > j; k--) {
					pNum[(P[i] - 1) * M + k] = pNum[(P[i] - 1) * M + k - 1];
				}
				pNum[(P[i] - 1) * M + j] = i;
				break;
			}
		}
	}

	char **pINum;
	pINum = new char*[M];
	for (int i = 0; i < M; i++)pINum[i] = new char[16];
	for(int i = 0; i < N; i++){
		for(int j = 0; j < M; j++){
			if(pNum[i * M + j] == M)break;
			sprintf_s(pINum[pNum[i * M + j]], 16, "%06d%06d", i + 1, j + 1);
		}
	}

	for (int i = 0; i < M; i++)cout << pINum[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
   37 |                         sprintf_s(pINum[pNum[i * M + j]], 16, "%06d%06d", i + 1, j + 1);
      |                         ^~~~~~~~~
      |                         sprintf
Language: Java


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeSet;

class main {	
	
	static Map map = new HashMap();
	
	public static void main(String[] args) throws IOException   {		
		
		Date date = new Date();
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		
		int cs = Integer.parseInt((bf.readLine().split(" ")[1]));
	
		int[][] ya = new int[cs][2];
		
		for(int i = 0; i < cs; i++ ) {	
			String[] line = bf.readLine().split(" ");
			int pt =  Integer.parseInt(line[0]);
			int ys =  Integer.parseInt(line[1]);
			ya[i][0] = pt;
			ya[i][1] = ys;
			addData(pt, ys);
		}	
		
		for(int i = 0; i < cs; i++) {
			int pt = ya[i][0];
			int ys = ya[i][1];
			int seq = getSeq(pt, ys);
			System.out.println(getFullNumber(pt) + getFullNumber(seq));
			
		}
		
		System.out.println(new Date().getTime() - date.getTime());
		
	}		
	
	private static int getSeq(int pt, int ys) {
		TreeSet<Integer> tset = (TreeSet<Integer>) map.get(pt);
		Iterator<Integer> iterator = tset.iterator();
		int seq = 0;
		while(iterator.hasNext()) {
			seq++;
			if(iterator.next() == ys){
				break;
			}
		}
		return seq;
		
	}

	private static void addData(int pt, int ys) {
		TreeSet tset = (TreeSet) map.get(pt);		
		if(tset == null) {
			tset = new TreeSet<Integer>();			
			map.put(pt, tset);
		}
		tset.add(ys);
		
	}
	


	private static String getFullNumber(int number) {
		String n = String.valueOf(number);
		int len = 6 - n.length();
		for(int i = 0; i < len; i++) {
			n = "0" + n;
		}
		return n;
	}

}

Compiler output:
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Language: Java

public static long[] city;
	public static int M;

	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String str = bf.readLine();
		String[] str1 = str.split(" ");
		M = Integer.parseInt(str1[1]);
		city = new long[M];
		String strCity[] = new String[M];
		long oldzhouyear[] = new long[M];
		long zhou = 0;
		long year = 0;
		for (int i = 0; i < M; i++) {
			str = bf.readLine();
			str1 = str.split(" ");
			zhou = Long.parseLong(str1[0]);
			year = Long.parseLong(str1[1]);
			oldzhouyear[i] = zhou * 10000000000l + year;
			city[i] = zhou * 10000000000l + year;
		}
		Arrays.sort(city);
		int a = (int) (city[0] / 10000000000l);
		int c = 0;
		int ind = 1;
		strCity[0] = intToStr(a) + intToStr(ind);
		for (int i = 1; i < M; i++) {
			c = (int) (city[i] / 10000000000l);
			if (c == a) {
				++ind;
				strCity[i] = intToStr(c) + intToStr(ind);
				a = c;
			} else {
				ind = 1;
				strCity[i] = intToStr(c) + intToStr(ind);
				a = c;
			}

		}
		for (int i = 0; i < M; i++) {
			ind = getIndex(oldzhouyear[i]);
			System.out.println(strCity[ind]);
		}

	}

	public static String intToStr(int a) {
		String res = "000000" + String.valueOf(a);
		return res.substring(res.length() - 6, res.length());
	}

	public static int getIndex(long num) {
		int left = 0, right = M - 1;
		if (city[left] == num) {
			return left;
		} else if (city[right] == num) {
			return right;
		}
		int mid = (left + right) / 2;
		while (num != city[mid]) {
			if (num <= city[mid]) {
				right = mid;
			} else {
				left = mid;
			}
			mid = (left + right) / 2;
		}
		return mid;
	}


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static long[] city;
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Solution {

	public static long[] city;
	public static int M;

	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String str = bf.readLine();
		String[] str1 = str.split(" ");
		M = Integer.parseInt(str1[1]);
		city = new long[M];
		String strCity[] = new String[M];
		long oldzhouyear[] = new long[M];
		long zhou = 0;
		long year = 0;
		for (int i = 0; i < M; i++) {
			str = bf.readLine();
			str1 = str.split(" ");
			zhou = Long.parseLong(str1[0]);
			year = Long.parseLong(str1[1]);
			oldzhouyear[i] = zhou * 10000000000l + year;
			city[i] = zhou * 10000000000l + year;
		}
		Arrays.sort(city);
		int a = (int) (city[0] / 10000000000l);
		int c = 0;
		int ind = 1;
		strCity[0] = intToStr(a) + intToStr(ind);
		for (int i = 1; i < M; i++) {
			c = (int) (city[i] / 10000000000l);
			if (c == a) {
				++ind;
				strCity[i] = intToStr(c) + intToStr(ind);
				a = c;
			} else {
				ind = 1;
				strCity[i] = intToStr(c) + intToStr(ind);
				a = c;
			}

		}
		for (int i = 0; i < M; i++) {
			ind = getIndex(oldzhouyear[i]);
			System.out.println(strCity[ind]);
		}

	}

	public static String intToStr(int a) {
		String res = "000000" + String.valueOf(a);
		return res.substring(res.length() - 6, res.length());
	}

	public static int getIndex(long num) {
		int left = 0, right = M - 1;
		if (city[left] == num) {
			return left;
		} else if (city[right] == num) {
			return right;
		}
		int mid = (left + right) / 2;
		while (num != city[mid]) {
			if (num <= city[mid]) {
				right = mid;
			} else {
				left = mid;
			}
			mid = (left + right) / 2;
		}
		return mid;
	}

}

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


import java.util.Scanner;

public class Test2 {	
	public static void main(String[] args)  {		
		Scanner scanner = new Scanner(System.in);
		scanner.nextInt();
		int cs = scanner.nextInt();
		int[] ca = new int[cs];
		int[] ys = new int[cs];
		
		for(int i = 0; i < cs; i++ ) {
			ca[i] = scanner.nextInt();
			ys[i]  = scanner.nextInt();
		}
		
		for(int i = 0; i < cs; i++) {
			int num = ca[i];
			int seq = getseq(num, ys[i],  ca, ys);
			System.out.println(getFullNumber(num) + getFullNumber(seq));
		}
	}
	
	private static int getseq(int num, int year, int[] ca, int[] ys) {
		int sequ = 1;
		for(int i = 0; i < ys.length; i++) {
			if(ca[i] == num && year > ys[i]) {
				sequ++;
			}
		}
		return sequ;
	}

	private static String getFullNumber(int number) {
		String n = String.valueOf(number);
		int len = 6 - n.length();
		for(int i = 0; i < len; i++) {
			n = "0" + n;
		}
		return n;
	}

}

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

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class Main2 {

    static int ProvNum;
    static int CityNum;
    static int[] CityYear;
    static int[] CityOrder;
    static Map<Integer,List<Integer>> map;
    
    public static void main(String[] args) throws IOException {

        Scanner sc = new Scanner(System.in);

        ProvNum = sc.nextInt();
        CityNum = sc.nextInt();
        CityYear = new int[CityNum];
        CityOrder = new int[CityNum];
        map = new HashMap<Integer,List<Integer>>();
        for (int i = 0; i < CityNum; i++) {
        	List<Integer> list ;
        	CityYear[i] = sc.nextInt();
        	CityOrder[i] = sc.nextInt();
        	if(map.containsKey(CityYear[i])){
        		list =map.get(CityYear[i]);
        	}else{ 
        		list= new ArrayList<Integer>();        		
        	}
        	list.add(CityOrder[i]);
    		map.put(CityYear[i], list);
        }        
        for(Integer key : map.keySet()){        	   
        	Collections.sort(map.get(key));
        }
        
    	for (int j = 0; j < CityNum; j++){
    		for(Integer city : map.keySet()){
    		if(city==CityYear[j]){
    			StringBuffer sb= new StringBuffer();        	
            	int key =binarySearch(map.get(city),CityOrder[j])+1;
            	String year=CityYear[j]+"";
            	String number=key+"";
            	if(year.length()<6){
            		for(int k=0;k<6-year.length();k++){
            			sb.append("0");
            		}
            	}
            	sb.append(year);
            	if(number.length()<6){
            		for(int k=0;k<6-number.length();k++){
            			sb.append("0");
            		}
            	}
            	sb.append(number);
            	System.out.println(sb.toString());
    		}            	
        	
        }
      }       
        
    }
    public static int binarySearch(List<Integer> list,int num){
    	int[] array = new int[list.size()];
    	for(int i=0;i<list.size();i++){
    		array[i]=list.get(i);
    	}
        int low=0;
        int upper=array.length-1;
        while(low<=upper){
            int mid=(upper+low)/2;
            if(array[mid]<num){
                low=mid+1;
            }
            else if(array[mid]>num){
                upper=mid-1;
            }
            else{
            	return mid;
            }
                
        }
        return -1;
    }
  
}

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


public class Main {

	public static void main(String[] args) throws Exception {

//		System.setIn(new FileInputStream("D:\\Workspace\\SW\\src\\b\\tt2"));
//		long start = System.currentTimeMillis();

		// strat
		// B - ID
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		StringTokenizer st = new StringTokenizer(br.readLine());
		int N = Integer.parseInt(st.nextToken());
		int M = Integer.parseInt(st.nextToken());

//		int[][] arr = new int[2][M + 1];// 0 保存原值P，1保存原值Y， 2州内顺序
		int[][][] P = new int[2][N + 1][M + 1];
//		int[] arrO = new int[M + 1];

//		long start1 = System.currentTimeMillis();
		for (int i = 1; i <= M; i++) {
			st = new StringTokenizer(br.readLine());

			int p = Integer.parseInt(st.nextToken());
			int y = Integer.parseInt(st.nextToken());
			P[0][0][i] = p;
//			arr[1][i] = y;

			int order = 1;
			for (int j = 1; j <= P[0][p][0]; j++) {
				if (y < P[0][p][j]) {
					P[1][0][P[1][p][j]]++;
				} else {
					order++;
				}
			}

			P[1][0][i] = order;
			P[0][p][++P[0][p][0]] = y;
			P[1][p][P[0][p][0]] = i;

			/*
			 * for (int j = 1; j < i; j++) { if(p == arr[0][j]) { if(y < arr[1][j]) {
			 * arr[1][j]++; }else { order++; } } }
			 */
			P[1][0][i] = order;
		}
//		long end1 = System.currentTimeMillis();
//
//		long start2 = System.currentTimeMillis();
		for (int i = 1; i <= M; i++) {
			System.out.format("%06d%06d\n", P[0][0][i], P[1][0][i]);
		}
//		long end2 = System.currentTimeMillis();
//
//		// end
//		long end = System.currentTimeMillis();
//		System.out.format("%.3f  ms", (end1 - start1) / 1000.0);
//		System.out.format("%.3f  ms", (end2 - start2) / 1000.0);
//		System.out.format("%.3f  ms", (end - start) / 1000.0);
	}

}


Compiler output:
Main.java:11: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:11: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:11: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:13: error: cannot find symbol
		StringTokenizer st = new StringTokenizer(br.readLine());
		^
  symbol:   class StringTokenizer
  location: class Main
Main.java:13: error: cannot find symbol
		StringTokenizer st = new StringTokenizer(br.readLine());
		                         ^
  symbol:   class StringTokenizer
  location: class Main
Main.java:23: error: cannot find symbol
			st = new StringTokenizer(br.readLine());
			         ^
  symbol:   class StringTokenizer
  location: class Main
6 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public class Main2 {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] str = br.readLine().split(" ");
		int m = Integer.parseInt(str[1]);
		List<String> list = new ArrayList<String>();
		Map<Integer, List<Integer>> map = new HashMap<Integer, List<Integer>>();
		while (m > 0) {
			String r = br.readLine();
			list.add(r);
			String[] row = r.split(" ");
			int p = Integer.parseInt(row[0]);
			int y = Integer.parseInt(row[1]);
			if (map.containsKey(p)) {
				map.get(p).add(y);
			} else {
				List<Integer> l = new ArrayList<Integer>();
				l.add(y);
				map.put(p, l);
			}
			m--;
		}
		Map<Integer, Map<Integer, Integer>> nm = new HashMap<Integer, Map<Integer, Integer>>();
		for (Entry<Integer, List<Integer>> en : map.entrySet()) {
			int key = en.getKey();
			List<Integer> value = en.getValue();
			Collections.sort(value);
			Map<Integer, Integer> subm = new HashMap<Integer, Integer>();
			for (int i = 1; i < value.size() + 1; i++) {
				subm.put(value.get(i - 1), i);
			}
			nm.put(key, subm);
		}
		for (String r : list) {
			String[] row = r.split(" ");
			int p = Integer.parseInt(row[0]);
			int y = Integer.parseInt(row[1]);
			int num = nm.get(p).get(y);
			String str1 = "000000" + p;
			String font = str1.substring(str1.length() - 6);
			String str2 = "000000" + num;
			String end = str2.substring(str2.length() - 6);
			System.out.println(font + end);
		}
	}
}


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

import java.util.Scanner;

public class Main2
{
    public static void main(String[] args)
    {
        final Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        final int M = sc.nextInt();

        final int[][] original = new int[M][3];
        final int[][] year = new int[1000001][2];
        final int[] inputOrder = new int[M];
        final int[] area = new int[N + 1];
        for (int i = 0; i < M; i++)
        {
            original[i][0] = i;
            original[i][1] = sc.nextInt();
            original[i][2] = sc.nextInt();
            year[original[i][2]][0] = original[i][1];
            inputOrder[i] = original[i][2];
        }

        for (int i = 1; i < year.length; i++)
        {
            area[year[i][0]]++;
            year[i][1] = area[year[i][0]];
        }
        String tempArea;
        String tempYearOrder;
        for (int i = 0; i < M; i++)
        {
            tempArea = String.valueOf(year[inputOrder[i]][0]);
            tempYearOrder = String.valueOf(year[inputOrder[i]][1]);
            while (tempArea.length() < 6)
            {
                tempArea = "0" + tempArea;
            }
            while (tempYearOrder.length() < 6)
            {
                tempYearOrder = "0" + tempYearOrder;
            }
            System.out.println(tempArea + tempYearOrder);
        }
    }

}


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

import java.io.*;
import java.util.*;
/**
 * @author Rick
 *
 */
class City
{
	int ID;
	int Prefecture;
	int Year;
}

public class T02CityID {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		//System.setIn(new FileInputStream("T02CityID.txt"));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int N=Integer.parseInt(st.nextToken().trim());
		int M=Integer.parseInt(st.nextToken().trim());
		int[][] PrefectureCities = new int[N][M];
		for(int i=0; i<N; i++)
		{
			Arrays.fill(PrefectureCities[i],999999);
		}
		City[] cities = new City[M];
		for(int i=0;i<M;i++)
		{
			st = new StringTokenizer(br.readLine());
			int p=Integer.parseInt(st.nextToken().trim());
			int y=Integer.parseInt(st.nextToken().trim());
			cities[i]=new City();
			cities[i].ID=i;
			cities[i].Prefecture=p;
			cities[i].Year=y;
			AddYear2Prefecture(PrefectureCities[p-1],y);
	        }
	
		for(int i=0;i<M;i++)
		{
			int p= cities[i].Prefecture;
			int y= cities[i].Year;
			String pId=String.valueOf(p);
			StringBuilder sb = new StringBuilder();
			for(int z=0;z<=6-pId.length();z++)
			{
				sb.append("0");
			}
			sb.append(pId);
			for(int z=0;z<PrefectureCities[p-1].length;z++)
			{
				if(PrefectureCities[p-1][z]==999999)
					break;
				if(y==PrefectureCities[p-1][z]){
					String yID=String.valueOf(z+1);
					for(int t=0;t<=6-yID.length();t++)
					{
						sb.append("0");
					}
					sb.append(yID);
					break;
				}
			}
							
			System.out.println(sb.toString());
		}
	}
	
	private static void AddYear2Prefecture(int[] is, int p){
		  for(int i=0;i<is.length;i++)
		  {
			  if(is[i]==999999) { is[i]=p; break;}
		  }
		  Arrays.sort(is);
	  }
}

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

import java.awt.Point;
import java.io.IOException;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeMap;

public class Solution {

	public static void main(String[] args) throws IOException {
//		System.setIn(new FileInputStream("tc/1.txt"));
		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int M = sc.nextInt();
		HashMap<Integer, TreeMap<Integer, Integer>> order = new HashMap<>();
		Point[] data = new Point[M];
		for (int i = 0; i < M; i++) {
			int pref = sc.nextInt();
			int year = sc.nextInt();
			TreeMap<Integer, Integer> pData = order.get(pref);
			if (pData == null) {
				pData = new TreeMap<Integer, Integer>();
			}
			pData.put(year, i);
			order.put(pref, pData);
			data[i] = new Point(pref, year);
		}
		for (int i = 0; i < M; i++) {
			int pref = data[i].x;
			int year = data[i].y;
			int yRank = 1;
			for (int j : order.keySet()) {
				if (j == pref) {
					TreeMap<Integer, Integer> pData = order.get(j);
					for (int k : pData.keySet()) {
						if (k == year) {
							break;
						}
						yRank++;
					}
					break;
				}
			}
			String result = String.format("%06d", pref) + String.format("%06d", yRank);
			System.out.println(result);
		}
		sc.close();
	}

}


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

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

    static int N;
    static int M;
    static int [][] city;
    public static void main(String args[]) throws Exception {

        System.setIn(new FileInputStream(
   
        Scanner sc = new Scanner(System.in);
        N= sc.nextInt();
        M= sc.nextInt();
        city = new int[M][N];

        for (int i = 0; i < M; i++) {
            for (int j = 0; j < N; j++) {
                city[i][j] = sc.nextInt();
            }
        }
        for (int i = 1; i <= N; i++) {
            List<Integer> list = new ArrayList<>();
            for (int j = 0; j <M; j++) {
                if (city[j][0] == i){

                    list.add(city[j][1]);
                }
            }
            sort(i,list);
            if (list.isEmpty()){
                list.clear();
            }
        }
    }

    public static void sort(int n,List<Integer> list){
        Collections.sort(list);

        for (int i = 0; i < list.size(); i++) {

            String str = String.format("%06d", n) + String.format("%06d",(i+1));
            System.out.println(str);
        }

    }
}

Compiler output:
Main.java:15: error: ')' or ',' expected
        Scanner sc = new Scanner(System.in);
               ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

public class CitySolve {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int areaNum = sc.nextInt();
		int cityNum = sc.nextInt();
		List<Set<City>> l = new ArrayList<Set<City>>();
		for(int i = 0; i < areaNum; i++) {
			l.add(new TreeSet<City>(new Comparator<City>(){  
				 public int compare(City c1, City c2) {           
				        return c1.getTime()-c2.getTime();//降序排列  
				    } 
			}));
		}
		for(int i = 0; i < cityNum; i++) {
			int area = sc.nextInt();
			int time = sc.nextInt();
			l.get(area-1).add(new City(area-1, time, i));
		}
		
		Set<City> result = new TreeSet<City>(new Comparator<City>(){  
			 public int compare(City c1, City c2) {           
			        return c1.getOrder()-c2.getOrder();//降序排列  
			    } 
		});
		
		for(int i = 0; i < areaNum; i++){
			int j = 1;
			for(Object c : l.get(i)){
				
				City c1 = (City)c;
				c1.setCode(formatNum(c1.getArea()+1, j));
				j++;
				result.add(c1);
			}
		}
		
		for(City c : result) {
			System.out.println(c.getCode());
		}
		
	}
	
	 
	
	private static String formatNum(int area, int order){
		String areaC = String.format("%06d", area);
		String timeC = String.format("%06d", order);
		return areaC+timeC;
	}
	
	static class City {
		private int time;
		private int area;
		private int order;
		private String code;
		public City() {
			super();
			// TODO Auto-generated constructor stub
		}
		public City( int area, int time, int order) {
			super();
			this.time = time;
			this.area = area;
			this.order = order;
		}
		
		
		
		public int getTime() {
			return time;
		}
		public void setTime(int time) {
			this.time = time;
		}
		public int getArea() {
			return area;
		}
		public void setArea(int area) {
			this.area = area;
		}
		public int getOrder() {
			return order;
		}
		public void setOrder(int order) {
			this.order = order;
		}
		
		public String getCode() {
			return code;
		}
		public void setCode(String code) {
			this.code = code;
		}
		
	}
}

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

import java.util.Comparator;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

public class CitySolve {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int areaNum = sc.nextInt();
		int cityNum = sc.nextInt();
		@SuppressWarnings("unchecked")
		Set<City>[] l = new TreeSet[areaNum];
		
		for(int i = 0; i < areaNum; i++) {
			l[i] = new TreeSet<City>(new Comparator<City>(){  
				 public int compare(City c1, City c2) {           
				        return c1.getTime()-c2.getTime();//降序排列  
				    } 
			});
		}
		for(int i = 0; i < cityNum; i++) {
			int area = sc.nextInt();
			int time = sc.nextInt();
			l[area-1].add(new City(area-1, time, i));
		}
		
		Set<City> result = new TreeSet<City>(new Comparator<City>(){  
			 public int compare(City c1, City c2) {           
			        return c1.getOrder()-c2.getOrder();//降序排列  
			    } 
		});
		
		for(int i = 0; i < areaNum; i++){
			int j = 1;
			for(Object c : l[i]){
				
				City c1 = (City)c;
				c1.setCode(formatNum(c1.getArea()+1, j));
				j++;
				result.add(c1);
			}
		}
		
		for(City c : result) {
			System.out.println(c.getCode());
		}
		
	}
	
	 
	
	private static String formatNum(int area, int order){
		String areaC = String.format("%06d", area);
		String timeC = String.format("%06d", order);
		return areaC+timeC;
	}
	
	static class City {
		private int time;
		private int area;
		private int order;
		private String code;
		public City() {
			super();
			// TODO Auto-generated constructor stub
		}
		public City( int area, int time, int order) {
			super();
			this.time = time;
			this.area = area;
			this.order = order;
		}
		
		
		
		public int getTime() {
			return time;
		}
		public void setTime(int time) {
			this.time = time;
		}
		public int getArea() {
			return area;
		}
		public void setArea(int area) {
			this.area = area;
		}
		public int getOrder() {
			return order;
		}
		public void setOrder(int order) {
			this.order = order;
		}
		
		public String getCode() {
			return code;
		}
		public void setCode(String code) {
			this.code = code;
		}
		
	}
}


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

import java.util.Comparator;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

public class CityId {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int areaNum = sc.nextInt();
		int cityNum = sc.nextInt();
		@SuppressWarnings("unchecked")
		Set<City>[] l = new TreeSet[areaNum];
		
		for(int i = 0; i < areaNum; i++) {
			l[i] = new TreeSet<City>(new Comparator<City>(){  
				 public int compare(City c1, City c2) {           
				        return c1.getTime()-c2.getTime();//降序排列  
				    } 
			});
		}
		for(int i = 0; i < cityNum; i++) {
			int area = sc.nextInt();
			int time = sc.nextInt();
			l[area-1].add(new City(area-1, time, i));
		}
		
		Set<City> result = new TreeSet<City>(new Comparator<City>(){  
			 public int compare(City c1, City c2) {           
			        return c1.getOrder()-c2.getOrder();//降序排列  
			    } 
		});
		
		for(int i = 0; i < areaNum; i++){
			int j = 1;
			for(Object c : l[i]){
				
				City c1 = (City)c;
				c1.setCode(formatNum(c1.getArea()+1, j));
				j++;
				result.add(c1);
			}
		}
		
		for(City c : result) {
			System.out.println(c.getCode());
		}
		
	}
	
	 
	
	private static String formatNum(int area, int order){
		String areaC = String.format("%06d", area);
		String timeC = String.format("%06d", order);
		return areaC+timeC;
	}
	
	static class City {
		private int time;
		private int area;
		private int order;
		private String code;
		public City() {
			super();
			// TODO Auto-generated constructor stub
		}
		public City( int area, int time, int order) {
			super();
			this.time = time;
			this.area = area;
			this.order = order;
		}
		
		
		
		public int getTime() {
			return time;
		}
		public void setTime(int time) {
			this.time = time;
		}
		public int getArea() {
			return area;
		}
		public void setArea(int area) {
			this.area = area;
		}
		public int getOrder() {
			return order;
		}
		public void setOrder(int order) {
			this.order = order;
		}
		
		public String getCode() {
			return code;
		}
		public void setCode(String code) {
			this.code = code;
		}
		
	}
}

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

import java.util.Comparator;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

public class CityId {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int areaNum = sc.nextInt();
		int cityNum = sc.nextInt();
		Set[] l = new TreeSet[areaNum];
		
		for(int i = 0; i < areaNum; i++) {
			l[i] = new TreeSet<City>(new Comparator<City>(){  
				 public int compare(City c1, City c2) {           
				        return c1.getTime()-c2.getTime();//降序排列  
				    } 
			});
		}
		for(int i = 0; i < cityNum; i++) {
			int area = sc.nextInt();
			int time = sc.nextInt();
			l[area-1].add(new City(area-1, time, i));
		}
		
		Set<City> result = new TreeSet<City>(new Comparator<City>(){  
			 public int compare(City c1, City c2) {           
			        return c1.getOrder()-c2.getOrder();//降序排列  
			    } 
		});
		
		for(int i = 0; i < areaNum; i++){
			int j = 1;
			for(Object c : l[i]){
				
				City c1 = (City)c;
				c1.setCode(formatNum(c1.getArea()+1, j));
				j++;
				result.add(c1);
			}
		}
		
		for(City c : result) {
			System.out.println(c.getCode());
		}
		
	}
	
	 
	
	private static String formatNum(int area, int order){
		String areaC = String.format("%06d", area);
		String timeC = String.format("%06d", order);
		return areaC+timeC;
	}
	
	static class City {
		private int time;
		private int area;
		private int order;
		private String code;
		public City() {
			super();
			// TODO Auto-generated constructor stub
		}
		public City( int area, int time, int order) {
			super();
			this.time = time;
			this.area = area;
			this.order = order;
		}
		
		
		
		public int getTime() {
			return time;
		}
		public void setTime(int time) {
			this.time = time;
		}
		public int getArea() {
			return area;
		}
		public void setArea(int area) {
			this.area = area;
		}
		public int getOrder() {
			return order;
		}
		public void setOrder(int order) {
			this.order = order;
		}
		
		public String getCode() {
			return code;
		}
		public void setCode(String code) {
			this.code = code;
		}
		
	}
}


Compiler output:
Main.java:6: error: class CityId is public, should be declared in a file named CityId.java
public class CityId {
       ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: Java

import java.util.Scanner;

public class main {

	static int N,M;
	static int[] arr;
	
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		N = sc.nextInt();
		M = sc.nextInt();
		arr = new int[N];
		
		for(int i=0;i<M;i++) {
			int P = sc.nextInt();
			int Y = sc.nextInt();
			arr[P-1]++;
		}
		
		for(int i=0;i<arr.length;i++) {
			for(int j=0;j<arr[i];j++) {
				String id1 = String.format("%06d", i+1);
				String id2 = String.format("%06d", j+1);
				System.out.println(id1+id2);
			}
		}
	}

}


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