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

#include <bits/stdc++.h>
using namespace std;
int main () {
  int N, M;
  cin >> N >> M;
  vevtor<int> ken(M), si(M);
  for (int i = 0; i < M; i++) {
    cin >> ken.at(i) >> si.at(i);
  }
  int count = 0;
  for (int i = 0; i < M; i++) {
    if(ken.at(i) >= 100000) cout << ken.at(i);
    else if(ken.at(i) >= 10000) cout << 0 << ken.at(i);
    else if(ken.at(i) >= 1000) cout << 00 << ken.at(i);
    else if(ken.at(i) >= 100) cout << 000 << ken.at(i);
    else if(ken.at(i) >= 10) cout << 0000 << ken.at(i);
    else if(ken.at(i) >= 1) cout << 00000 << ken.at(i);
    for (int j = 0; j < M; j++) {
      count = 1;
      if (ken.at(i) == ken.at(j) && si.at(i) > si.at(j)) count++;
    }
    if(count >= 100000) cout << count << endl;
    else if(count >= 10000) cout << 0 << count << endl;
    else if(count >= 1000) cout << 00 << count << endl;
    else if(count >= 100) cout << 000 << count << endl;
    else if(count >= 10) cout << 0000 << count << endl;
    else if(count >= 1) cout << 00000 << count << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vevtor' was not declared in this scope
    6 |   vevtor<int> ken(M), si(M);
      |   ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vevtor<int> ken(M), si(M);
      |          ^~~
a.cc:8:12: error: 'ken' was not declared in this scope
    8 |     cin >> ken.at(i) >> si.at(i);
      |            ^~~
a.cc:8:25: error: 'si' was not declared in this scope; did you mean 'i'?
    8 |     cin >> ken.at(i) >> si.at(i);
      |                         ^~
      |                         i
a.cc:12:8: error: 'ken' was not declared in this scope
   12 |     if(ken.at(i) >= 100000) cout << ken.at(i);
      |        ^~~
a.cc:20:11: error: 'ken' was not declared in this scope
   20 |       if (ken.at(i) == ken.at(j) && si.at(i) > si.at(j)) count++;
      |           ^~~
a.cc:20:37: error: 'si' was not declared in this scope; did you mean 'i'?
   20 |       if (ken.at(i) == ken.at(j) && si.at(i) > si.at(j)) count++;
      |                                     ^~
      |                                     i
Language: Java

import java.util.*;

public class Main {

    long INF = Long.MAX_VALUE;

    public static void main(String[] args) {
        new C_ID().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] pc = new int[N + 1];
        long[] P = new long[M];
        long[][] Y = new long[M][3];
        Arrays.fill(pc, 0);
        for (int i = 0; i < M; i++) {
            P[i] = sc.nextLong();
            Y[i][0] = sc.nextLong();
            Y[i][1] = i;
            Y[i][2] = P[i];
        }
        Arrays.sort(Y, (a, b) -> Long.compare(a[0], b[0]));
        for (int i = 0; i < M; i++) {
            pc[(int) Y[i][2]]++;
            Y[i][0] = pc[(int) Y[i][2]];
        }
        Arrays.sort(Y, (a, b) -> Long.compare(a[1], b[1]));
        for (int i = 0; i < M; i++) {
            if (String.valueOf(P[i]).length() == 2) {
                System.out.print("0000");
            } else if (String.valueOf(P[i]).length() == 3) {
                System.out.print("000");
            } else if (String.valueOf(P[i]).length() == 4) {
                System.out.print("00");
            } else if (String.valueOf(P[i]).length() == 5) {
                System.out.print("0");
            } else if (String.valueOf(P[i]).length() == 1) {
                System.out.print("00000");
            }
            System.out.println(P[i] * 1000000 + Y[i][0]);
        }
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        new C_ID().solve();
            ^
  symbol:   class C_ID
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
#define MAXN (100010)
using namespace std;
int p[MAXN], y[MAXN];
vector<int> vec[MAXN];

int main() {
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= m; ++i) {
        cin >> p[i] >> y[i];
        vec[p[i]].push_back(y[i]);
    }
    for (int j = 1; j <= n; ++j) {
        sort(vec[j].begin(), vec[j].end());
    }
    for (int k = 1; k <= m; ++k) {
        printf("%06d%06d\n", p[k], lower_bound(vec[p[k]].begin(), vec[p[k]].end(), y[k]) - vec[p[k]].begin() + 1ggvG);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:112: error: unable to find numeric literal operator 'operator""ggvG'
   18 |         printf("%06d%06d\n", p[k], lower_bound(vec[p[k]].begin(), vec[p[k]].end(), y[k]) - vec[p[k]].begin() + 1ggvG);
      |                                                                                                                ^~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
typedef long long ll;

int main(){
    int N, M; cin >> N >> M;
    int P[100001], Y[100001];
    rep(i, M) cin >> P[i] >> Y[i];

    vector<int> x[100001];
    rep(i, M) x[P[i]].push_back(Y[i]);
    rep(i, N) sort(x[i+1].begin(), x[i+1].end());
    //rep(i, M) sort(x[i+1].begin(), x[i+1].end());
     

    rep(iM M){
      rep(i, M){
      // cout << P[i]  << " ";
        printf("%06d", P[i]);
        printf("%06d\n", int(lower_bound(x[P[i]].begin(), x[P[i]].end(), Y[i]) - x[P[i]].begin()) + 1);

    }
    

    return 0;
}

Compiler output:
a.cc:20:13: error: macro "rep" requires 2 arguments, but only 1 given
   20 |     rep(iM M){
      |             ^
a.cc:6:9: note: macro "rep" defined here
    6 | #define rep(i, n) for(int i = 0; i < n; i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:20:5: error: 'rep' was not declared in this scope
   20 |     rep(iM M){
      |     ^~~
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:9:11: note: to match this '{'
    9 | int main(){
      |           ^
Language: C++

#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long ll;

#define NMAX 100000
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
    int N,M;

    cin>>N>>M;
    int P[N],Y[NMAX];
    vector<int> yd[NMAX+1];
    rep(i,M) cin>>P[i]>>Y[i],yd[P[i]].push_back(Y[i]);
    rep(i,N) sort(yd[i+1].begin(),yd[i+1].end());
    rep(i,M) printf("%012lld\n",ll(P[i])*1000000+int(lower_bound(yd[P[i]].begin(),yd[P[i]].end(),Y[i])-yd[P[i]].begin()+1));
}

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

#include<cstdio>
#include<vector>
#include<algorithm>
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int N,M;
int P[100000],Y[1000000000];
vector<int> yd[100001];
int main(){
  scanf("%d %d",&N,&M);
  rep(i,M)scanf("%d %d",&P[i],&Y[i]),yd[P[i]].push_back(Y[i]);
  rep(i,N)sort(yd[i+1].begin(),yd[i+1].end());
  rep(i,M)printf("%06d",P[i]),printf("%06d\n",int(lower_bound(yd[P[i]].begin(),yd[P[i]].end(),Y[i])-yd[P[i]].begin())+1);
  return 0;
}


Compiler output:
/tmp/ccIspxPf.o: in function `main':
a.cc:(.text+0xae): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccIspxPf.o
a.cc:(.text+0x10d): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccIspxPf.o
a.cc:(.text+0x138): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccIspxPf.o
a.cc:(.text+0x1c4): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccIspxPf.o
a.cc:(.text+0x219): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccIspxPf.o
a.cc:(.text+0x255): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccIspxPf.o
/tmp/ccIspxPf.o: in function `__tcf_0':
a.cc:(.text+0x2d3): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccIspxPf.o
a.cc:(.text+0x2da): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccIspxPf.o
/tmp/ccIspxPf.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x301): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccIspxPf.o
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdio>
#include<vector>
#include<algorithm>
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int P[100000],Y[1000000000];
vector<int> yd[100001];

int main(){
  int N,M,result;
  result=scanf("%d %d",&N,&M);
  rep(i,M)result=scanf("%d %d",&P[i],&Y[i]),yd[P[i]].push_back(Y[i]);
  rep(i,N)sort(yd[i+1].begin(),yd[i+1].end());
  rep(i,M)printf("%06d",P[i]),printf("%06d\n",int(lower_bound(yd[P[i]].begin(),yd[P[i]].end(),Y[i])-yd[P[i]].begin())+1);
  return 0;
}


Compiler output:
/tmp/ccFchdg8.o: in function `main':
a.cc:(.text+0xab): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccFchdg8.o
a.cc:(.text+0x107): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccFchdg8.o
a.cc:(.text+0x132): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccFchdg8.o
a.cc:(.text+0x1bb): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccFchdg8.o
a.cc:(.text+0x210): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccFchdg8.o
a.cc:(.text+0x24c): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccFchdg8.o
/tmp/ccFchdg8.o: in function `__tcf_0':
a.cc:(.text+0x2c7): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccFchdg8.o
a.cc:(.text+0x2ce): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccFchdg8.o
/tmp/ccFchdg8.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x2f5): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccFchdg8.o
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdio>
#include<vector>
#include<algorithm>
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int P[100000],Y[1000000000];
vector<int> yd[100001];

int main(){
  int N,M;
  scanf("%d %d",&N,&M);
  rep(i,M)scanf("%d %d",&P[i],&Y[i]),yd[P[i]].push_back(Y[i]);
  rep(i,N)sort(yd[i+1].begin(),yd[i+1].end());
  rep(i,M)printf("%06d",P[i]),printf("%06d\n",int(lower_bound(yd[P[i]].begin(),yd[P[i]].end(),Y[i])-yd[P[i]].begin())+1);
  return 0;
}


Compiler output:
/tmp/ccK3ap7E.o: in function `main':
a.cc:(.text+0xa5): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccK3ap7E.o
a.cc:(.text+0x101): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccK3ap7E.o
a.cc:(.text+0x12c): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccK3ap7E.o
a.cc:(.text+0x1b5): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccK3ap7E.o
a.cc:(.text+0x20a): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccK3ap7E.o
a.cc:(.text+0x246): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccK3ap7E.o
/tmp/ccK3ap7E.o: in function `__tcf_0':
a.cc:(.text+0x2c1): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccK3ap7E.o
a.cc:(.text+0x2c8): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccK3ap7E.o
/tmp/ccK3ap7E.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x2ef): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccK3ap7E.o
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdio>
#include<vector>
#include<algorithm>
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int N,M;
int P[100000],Y[1000000000];
vector<int> yd[100001];

int main(){
  scanf("%d%d",&N,&M);
  rep(i,M)scanf("%d%d",&P[i],&Y[i]),yd[P[i]].push_back(Y[i]);
  rep(i,N)sort(yd[i+1].begin(),yd[i+1].end());
  rep(i,M)printf("%06d",P[i]),printf("%06d\n",int(lower_bound(yd[P[i]].begin(),yd[P[i]].end(),Y[i])-yd[P[i]].begin())+1);
  return 0;
}


Compiler output:
/tmp/cc43vVeo.o: in function `main':
a.cc:(.text+0xae): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/cc43vVeo.o
a.cc:(.text+0x10d): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/cc43vVeo.o
a.cc:(.text+0x138): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/cc43vVeo.o
a.cc:(.text+0x1c4): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/cc43vVeo.o
a.cc:(.text+0x219): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/cc43vVeo.o
a.cc:(.text+0x255): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/cc43vVeo.o
/tmp/cc43vVeo.o: in function `__tcf_0':
a.cc:(.text+0x2d3): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/cc43vVeo.o
a.cc:(.text+0x2da): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/cc43vVeo.o
/tmp/cc43vVeo.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x301): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/cc43vVeo.o
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdio>
#include<vector>
#include<algorithm>
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int N,M;
int P[100000],Y[1000000000];
vector<int> yd[100001];

int main(){
  scanf("%d%d",&N,&M);
  rep(i,M)scanf("%d%d",&P[i],&Y[i]),yd[P[i]].push_back(Y[i]);
  rep(i,N)sort(yd[i+1].begin(),yd[i+1].end());
  rep(i,M)printf("%06d",P[i]),printf("%06d\n",int(lower_bound(yd[P[i]].begin(),yd[P[i]].end(),Y[i])-yd[P[i]].begin())+1);
}


Compiler output:
/tmp/ccfThlRY.o: in function `main':
a.cc:(.text+0xae): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccfThlRY.o
a.cc:(.text+0x10d): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccfThlRY.o
a.cc:(.text+0x138): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccfThlRY.o
a.cc:(.text+0x1c4): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccfThlRY.o
a.cc:(.text+0x219): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccfThlRY.o
a.cc:(.text+0x255): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccfThlRY.o
/tmp/ccfThlRY.o: in function `__tcf_0':
a.cc:(.text+0x2d3): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccfThlRY.o
a.cc:(.text+0x2da): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccfThlRY.o
/tmp/ccfThlRY.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x301): relocation truncated to fit: R_X86_64_PC32 against symbol `yd' defined in .bss section in /tmp/ccfThlRY.o
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  vector<pair<int, int>> vec[100005];
  for(int i=0; i<M; i++){
    int p, y;
    cin >> p >> y;
    vec[p].push_back({y, i});
  }
  pair<int,int> ans[100001];
  for(int i=1; i<=N; i++){
    sort(vec[i].begin(), vec[i].end());
    for(int j=0; j<vec[i].size(); j++){
      ans[vec[i][j].second] = {i, j+1};
    }
  }

  for(int i=0; i<M; i++){
    printf("%06d%06d\n", ans[i].first, ans[i].second);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |     sort(vec[i].begin(), vec[i].end());
      |     ^~~~
      |     short
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define REP(i,b) FOR(i,0,b)
#define RFOR(i,a,b) for (int i = a-1; i >= b; i--)
#define RREP(i,a) RFOR(i,a,0)
#define REPALL(i,v) for (int i = 0; i < v.size(); i++)
#define SORT(v) sort(v.begin(), v.end())
#define FIND(v,n) find(v.begin(), v.end(), n)
#define MIN_ELEMENT(v) min_element(v.begin(), v.end())
#define MAX_ELEMENT(v) max_element(v.begin(), v.end())
#define COUNT(v,n) count(v.begin(), v.end(), n);
typedef long long ll;
typedef unsigned long long ull;
const int INF = 1e7;
const ll MOD = 1e9 + 7;

ll p[111111], y[111111];
vector<ll> v[111111];

ll getid(int i)
{
    vector<int> t = v[p[i]];
    ll l = 0, r = t.size();
    ll mid = (l + r) / 2, val;
    while (val = t[mid] - y[i]) {
        if (val > 0) {
            r = mid;
        } else {
            l = mid;
        }
        mid = (l + r) / 2;
    }
    return mid + 1;
}

int main()
{
    int n, m;
    cin>>n>>m;

    REP(i,m) {
        cin>>p[i]>>y[i];
        v[p[i]].push_back(y[i]);
    }

    REP(i,n) {
        SORT(v[i]);
    }

    REP(i,m) {
        printf("%06d%06d\n", p[i], getid(i));
    }

    return 0;
}


Compiler output:
a.cc: In function 'll getid(int)':
a.cc:23:27: error: conversion from 'vector<long long int>' to non-scalar type 'vector<int>' requested
   23 |     vector<int> t = v[p[i]];
      |                     ~~~~~~^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <numeric>
#include <map>
#include <ios>
#include <iomanip>
#include <set>
using namespace std;
//変数デバッグ
#define DEB(variable) cout << #variable << '=' << variable << endl
 
//for簡易表記(引数ミス防止)
#define FOR(LoopVariable,numberOFbegin,numberOFend) for (int LoopVariable = (numberOFbegin); (LoopVariable) < (numberOFend); (LoopVariable)++)
#define DEFOR(LoopVariable,numberOFbegin,numberOFend) for (int LoopVariable = (numberOFbegin); (LoopVariable) > (numberOFend); (LoopVariable)--)
#define REP(LoopVariable,numberOFend) for(int LoopVariable = 0;(LoopVariable)<(numberOFend);LoopVariable++)
 
 
int main(){
 
    int n,m;
    scanf("%d %d\n",&n,&m);
    vector<pair<int,int>> ids(m);
    set<int> grid[100001];
    
    REP(i,m){
        scanf("%d %d\n",&ids[i].first,&ids[i].second);
 
        grid[ids[i].first].insert(ids[i].second);
    }
    
 
 
 
    
    for(auto x:ids){
        
        printf("%06d%06ld\n", x.first, (int)(lower_bound(grid[ids[i]].begin(),grid[ids[i]].end(), idt[i])-grid[ids[i]].begin()) + 1);
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:67: error: 'i' was not declared in this scope
   40 |         printf("%06d%06ld\n", x.first, (int)(lower_bound(grid[ids[i]].begin(),grid[ids[i]].end(), idt[i])-grid[ids[i]].begin()) + 1);
      |                                                                   ^
a.cc:40:99: error: 'idt' was not declared in this scope; did you mean 'ids'?
   40 |         printf("%06d%06ld\n", x.first, (int)(lower_bound(grid[ids[i]].begin(),grid[ids[i]].end(), idt[i])-grid[ids[i]].begin()) + 1);
      |                                                                                                   ^~~
      |                                                                                                   ids
Language: C++

#include<iostream>
#include<sstream>
#include<iomanip>
#include<tuple>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef tuple<int,int,int> T;
typedef pair<int,string> P;

bool comp1(const T& l,const T& r){
	return get<0>(l) < get<0>(r);
}
bool comp2(const T& l,const T& r){
	return get<1>(l) < get<1>(r);
}
bool comp3(const T& l,const T& r){
	return get<2>(l) < get<2>(r);
}

int main(){
	int n,m;
	cin >> n >> m;
	vector<T> t;
	for(int i=0;i<m;i++){
		int p,y;
		cin >> p >> y;
		t.push_back(T(i,p,y));
	}
	sort(t.begin(),t.end(),comp3);
	sort(t.begin(),t.end(),comp2);
	vector<P> p;
	int town=1;
	int year=1;
	for(T x:t){
		if(town!=get<1>(x)){
			town=get<1>(x);
			year=1;
		}
		stringstream s;
		s << setw(12) << setfill('0') << ll(town)*1000000year;
		p.push_back(P(get<0>(x),s.str()));
		year++;
	}
	sort(p.begin(),p.end());
	for(P x:p) cout << x.second << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:59: error: unable to find numeric literal operator 'operator""year'
   42 |                 s << setw(12) << setfill('0') << ll(town)*1000000year;
      |                                                           ^~~~~~~~~~~
Language: C++

#include<iomanip>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long ll;
 
int p[100000],y[100000];
vector<int> t[1000001];
 
int main(){
	int n,m;
	cin >> n >> m;
	for(int i=0;i<m;i++){
		cin >> p[i] >> y[i];
		t[p[i]].push_back(y[i]);
	}
	for(int i=1;i<=n;i++) sort(t[i].begin(),t[i].end());
	for(int i=0;i<m;i++){
			cout << setw(12) << setfill('0') << 
			ll(p[i])*1000000+int(lower_bound(t[p[i]].begin(),t[p[i]].end(),y[i])-t[p[i]].begin())+1
			<< endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
   12 |         cin >> n >> m;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<algorithm>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:19:25: error: 'cout' was not declared in this scope
   19 |                         cout << setw(12) << setfill('0') <<
      |                         ^~~~
a.cc:19:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

# include <cstdio>
# include <vector>
# include <algorithm>
using namespace std;
typedef long long ll;
# define rep (i,n) for (int i=0; i < n ; i++)
int N , M ;
int P[100000] , Y[100000];
vector <int> yd[100001];
int main()
{
scanf("%d%d",&N,&M);
rep(i,M) scanf("%d%d",&P[i],&Y[i]),yd[P[i]].push_back(Y[i]);
rep(i,N) sort(yd[i+1].begin(),yd[i+1].end());
rep(i,M) printf("%012lld\n",ll(P[i])*1000000+int(lower_bound(yd[P[i]].begin(),yd[P[i]].end(),Y[i])-yd[P[i]].begin())+1);}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'i' was not declared in this scope
    6 | # define rep (i,n) for (int i=0; i < n ; i++)
      |               ^
a.cc:13:1: note: in expansion of macro 'rep'
   13 | rep(i,M) scanf("%d%d",&P[i],&Y[i]),yd[P[i]].push_back(Y[i]);
      | ^~~
a.cc:6:17: error: 'n' was not declared in this scope
    6 | # define rep (i,n) for (int i=0; i < n ; i++)
      |                 ^
a.cc:13:1: note: in expansion of macro 'rep'
   13 | rep(i,M) scanf("%d%d",&P[i],&Y[i]),yd[P[i]].push_back(Y[i]);
      | ^~~
Language: C++

#include "pch.h"
#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;

int main()
{
	int n, m;
	cin >> n >> m;
	vector<vector<int>> v(m, vector<int>(2));
	vector<vector<int>> w(n + 1);
	for (int i = 0; i < m; i++) {
		cin >> v[i][0] >> v[i][1];
		w[v[i][0]].push_back(v[i][1]);
	}
	for (int i = 0; i < n; i++) {
		sort(w[i].begin(), w[i].end());
	}
	for (int i = 0; i < m; i++) {
		int k = lower_bound(w[v[i][0]].begin(), w[v[i][0]].end(), v[i][1]) - w[v[i][0]].begin() + 1;
		cout << setw(6) << setfill('0') << v[i][0] << setw(6) << setfill('0') << k << endl;
	}
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C

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

typedef struct {
    int pref;       //prefecture number
    int year;       //constructed year
    int init_idx;   //input order
    int pref_idx;   //pref order
} city;

/* sort by year */
int cmp_year(const void *a, const void *b)
    return ((city*)a)->year - ((city*)b)->year;

/* sort by init_idx */
int cmp_idx(const void *a, const void *b)
    return ((city*)a)->init_idx - ((city*)b)->init_idx;



int main()
{
    int n, m;
    int i;

    scanf("%d %d",&n,&m);

    city c[m];
    int count[100000]={0};      //count of each pref order

    for(i=0; i<m; i++) {
        scanf("%d %d", &c[i].pref, &c[i].year);
        c[i].init_idx = i;      //c[i]'s init_idx equals to "i";
    }

    /* sort by year */
    qsort(c,m,sizeof(city),cmp_year);

    /* count c[i]'s order in a pref
       (already arranged in year order) */
    for(i=0; i<m; i++) {
        c[i].pref_idx = (++count[c[i].pref]);
    }

    /* sort by init_idx to inital order */
    qsort(c,m,sizeof(city),cmp_idx);

    for(i=0; i<m; i++) {
        printf("%06d%06d\n",c[i].pref,c[i].pref_idx);
    }

    return 0;
}

Compiler output:
main.c: In function 'cmp_year':
main.c:14:5: error: expected declaration specifiers before 'return'
   14 |     return ((city*)a)->year - ((city*)b)->year;
      |     ^~~~~~
main.c:18:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'return'
   18 |     return ((city*)a)->init_idx - ((city*)b)->init_idx;
      |     ^~~~~~
main.c:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   23 | {
      | ^
main.c:55: error: expected '{' at end of input
Language: C++



if __name__ == '__main__':
    ken_num, city_num = list(map(int, input().split()))
    data = []
    for i in range(city_num):
        element = list(map(int, input().split()))
        element.append(i)
        data.append(element)

    # data = [list(map(int, input().split())).append(i) for i in range(city_num)]

    # ken_num, city_num = 2, 3
    # data = [[1,32,0], [2,63,1],[1,12,2]]

    data = sorted(data, key=lambda x: (x[0], x[1]))

    count = 1
    ken_num = 1
    ans_data = {}

    for i in range(city_num):
        number = data[i][2]
        if data[i][0] != ken_num:
            count = 1
            ken_num = data[i][0]
        chr = "{0:06d}".format(ken_num) + "{0:06d}".format(count)
        ans_data.update({number:chr})
        count += 1

    for i in range(city_num):
        print(ans_data[i])

Compiler output:
a.cc:3:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    3 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:11:7: error: invalid preprocessing directive #data
   11 |     # data = [list(map(int, input().split())).append(i) for i in range(city_num)]
      |       ^~~~
a.cc:13:7: error: invalid preprocessing directive #ken_num
   13 |     # ken_num, city_num = 2, 3
      |       ^~~~~~~
a.cc:14:7: error: invalid preprocessing directive #data
   14 |     # data = [[1,32,0], [2,63,1],[1,12,2]]
      |       ^~~~
a.cc:3:1: error: expected unqualified-id before 'if'
    3 | if __name__ == '__main__':
      | ^~
a.cc:22:5: error: expected unqualified-id before 'for'
   22 |     for i in range(city_num):
      |     ^~~
a.cc:28:37: error: expected unqualified-id before ')' token
   28 |         ans_data.update({number:chr})
      |                                     ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int array[][] = new int[m][4];//pr, year, index, old
		for(int i = 0; i < m; i ++) {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = i;
		}

		Comp comp = new Comp();
		Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));

		int index = 0;
		for(int i = 1; i <= m; i ++) {
			if(i == m) {
				checkYear(array, index, i);
			}else if(array[i - 1][0] != array[i][0]) {
				checkYear(array, index, i);
				index = i;
			}
		}


		Arrays.sort(array, (a, b) -> Integer.compare(a[2], b[2]));
		for(int i = 0; i < m; i ++) {
			System.out.printf("%012d\n", array[i][0] * 1000000 + array[i][3]);
		}
	}

	private static void checkYear(int array[][], int index, int i) {
		for(int j = index; j < i; j ++) {
			int min = 1000000001;
			int minIndex = 0;
			for(int k = index; k < i; k ++) {
				if(array[k][3] != 0) { continue; }
				if(array[k][1] < min) {
					min = array[k][1];
					minIndex = k;
				}
			}
			array[minIndex][3] = j - index + 1;
		}
	}
}

Compiler output:
Main.java:14: error: cannot find symbol
		Comp comp = new Comp();
		^
  symbol:   class Comp
  location: class Main
Main.java:14: error: cannot find symbol
		Comp comp = new Comp();
		                ^
  symbol:   class Comp
  location: class Main
2 errors
Language: C++

#include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<stdio.h>
#include<set>
#include<cstdio>
#include<vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int main(){
    int n,m;
    cin>>n>>m;
    
    int P[100000],Y[100000];
    vector<int> v[100001];
    
    rep(i,m){
        cin>>P[i]>>Y[i];
        v[P[i]].push_back(Y[i]);
    }
  
    
    rep(i,n) sort(v[i+1].begin(),v[i+1].end());
    
//    rep(i,n)sort(v[i+1].begin(),v[i+1].end());
    
   rep(i,m){
        printf("%06d",P[i]);
        for(int j=0;j<v[P[i]].size();j++){
            u++;
            if(v[P[i]][j]==Y[i]){
                break;
            }
        }/*
        int u=int(lower_bound(v[P[i]]. begin(),v[P[i]].end(),Y[i])-v[P[i]].begin())+1;
        printf("%06d",u);*/
        cout<<endl;
    }

 /*   rep(i,m){
        printf("%012lld\n",ll(P[i])*1000000+int(lower_bound(v[P[i]]. begin(),v[P[i]].end(),Y[i])-v[P[i]].begin())+1);}*/

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:13: error: 'u' was not declared in this scope
   34 |             u++;
      |             ^
Language: C++


#include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<stdio.h>
#include<set>
#include<cstdio>
#include<vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int main(){
    int n,m;
    cin>>n>>m;
    
    int P[100000],Y[100000];
    vector<int> v[100001];
    
    rep(i,m){
        cin>>P[i]>>Y[i];
        v[P[i]].push_back(Y[i]);
    }
  
    
    rep(i,n) sort(v[i+1].begin(),v[i+1].end());
    
//    rep(i,n)sort(v[i+1].begin(),v[i+1].end());
    
   rep(i,m){
        printf("%06d",P[i]);
        for(int j=0;j<v[P[i]].size();j++){
            u++;
            if(v[P[i]][j]==Y[i]){
                break;
            }
        }
        int u=int(lower_bound(v[P[i]]. begin(),v[P[i]].end(),Y[i])-v[P[i]].begin())+1;
        printf("%06d",u);
        cout<<endl;
    }

 /*   rep(i,m){
        printf("%012lld\n",ll(P[i])*1000000+int(lower_bound(v[P[i]]. begin(),v[P[i]].end(),Y[i])-v[P[i]].begin())+1);}*/

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:13: error: 'u' was not declared in this scope
   35 |             u++;
      |             ^
Language: C++

#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)


int main () {
    int N,M;
    int P[100000],Y[100000];
    vector<int> yd[100001];
    
    cin>>N>>M;
    rep(i,M)scanf("%d%d",&P[i],&Y[i]),yd[P[i]].push_back(Y[i]);
    rep(i,N)sort(yd[i+1].begin(),yd[i+1].end());
    rep(i,M)printf("%012lld\n",ll(P[i])*1000000+int(lower_bound(yd[P[i]]. begin(),yd[P[i]].end(),Y[i])-yd[P[i]].begin())+1);
}


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

#include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<stdio.h>
#include<set>
#include<map>
#include<vector>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){

    int n,m;
    cin>>n>>m;
   vector<pair<int,int>> s[n];
    int si=1;
    int ansm[m+1];
   rep(i,m){
        int p,m;
        cin>>p>>m;
        ansm[i+1]=p;
        s[p-1].push_back(make_pair(m,si));
        si++;
    }

     rep(i,n)   sort(s[i].begin(),s[i].end());
    
    int ans[m+1];
    rep(i,n){
        rep(j.s[i].size()){
            int h=s[i][j].second;
            ans[h]=j+1;
        }
    }
    /*for(int i=1;i<m+1;i++){
        cout<<ansm[i]<<ans[i]<<endl;
    }*/
    for(int i=1;i<m+1;i++){
        printf("%06d",ansm[i]);
        printf("%06d",ans[i]);
        cout<<endl;
    }
   
return 0;
}


Compiler output:
a.cc:31:26: error: macro "rep" requires 2 arguments, but only 1 given
   31 |         rep(j.s[i].size()){
      |                          ^
a.cc:10:9: note: macro "rep" defined here
   10 | #define rep(i,n) for(int i=0;i<n;i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:31:9: error: 'rep' was not declared in this scope
   31 |         rep(j.s[i].size()){
      |         ^~~
Language: C++

#include  <cstdio >
#include  <vector >
#include  <algorithm >
using  namespace  std;
typedef  long  long ll;
#define  rep(i,n) for(int i=0;i<n;i++)
int N,M;
int P[100000] ,Y[100000];
vector <int > yd [100001];
int  main()
{
scanf ("%d%d",&N,&M);
rep(i,M)scanf ("%d%d",&P[i],&Y[i]),yd[P[i]]. push_back(Y[i]);
rep(i,N)sort(yd[i+1]. begin(),yd[i+1]. end ());
rep(i,M)printf ("%012 lld\n",ll(P[i])*1000000+ int(lower_bound(yd[P[i]].
begin(),yd[P[i]]. end(),Y[i])-yd[P[i]]. begin ())+1);
}

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

#include <algorithm>
#include <vector>
#include <iomanip>
using namespace std;
#define N 100005
int n, m, p[N], y[N];//n個の県にm個の市。市iはy[i]年に誕生していて県p[i]に属している
vector<int> vt[N];

int main(){
    int i, k;
    cin >> n >> m;
    for(i=0; i<m; i++){//県ごとのvector
        cin >> p[i]>> y[i];
        vt[p[i]].push_back(y[i]);
    }

    for(i=1; i<=n; i++){//それぞれの県ごとに年で昇順ソートする
        sort(vt[i].begin(), vt[i].end());
    }

    for(i=0; i<m; i++){
        k = lower_bound(vt[p[i]].begin(), vt[p[i]].end(), y[i]) - vt[p[i]].begin();//何番目に若いかを返す(0スタート)
        cout << setfill('0') << right << setw(6) << p[i];
        cout << setfill('0') << right << setw(6) << k+1 << endl;;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'cin' was not declared in this scope
   11 |     cin >> n >> m;
      |     ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <iomanip>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout << setfill('0') << right << setw(6) << p[i];
      |         ^~~~
a.cc:23:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java


import java.text.NumberFormat;
import java.util.Arrays;
import java.util.Scanner;

public class Main{
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		  
		  int N;
		  int M;
		  N = s.nextInt();
		  M = s.nextInt();
		  int code[][] = new int[M][4];
		  for(int i=0;i<M;i++) {
			  code[i][0]=i; 
			  code[i][1]=s.nextInt();
			  code[i][2]=s.nextInt();
			  code[i][3]=0;
		  }

Arrays.sort(code,0,M,new Comparator<int[]>() {
 public int compare(int[] x, int[] y) {
 if(x[1] < y[1]){
 return -1;
 } else if(x[1] > y[1]){
 return 1;
 } else { 
	if(x[2] < y[2]) 
		return -1; 
	else if(x[2] > y[2])
  		return 1; 
	else
  		return 0; 
}
 } 
		}); 		
int pchange=0,ychange=0;
  		for(int i=0;i<M;i++) 		{
  			int p= code[i][1]; 			if(pchange!=p) 			{ 
				pchange=p; 	
			ychange=1; 
			} 			else 			{
			ychange++; 			
} 
			code[i][3]=ychange; 		
} 	
	Arrays.sort(code,0,M,new Comparator<int[]>() { 
public int compare(int[] x, int[] y) {
 if(x[0] < y[0]){ 
return -1;
 } else if(x[0] > y[0]){ 
return 1; 
} else {
 return 0;
 } 
} 
		});





		  
		  double resurt;
		  double tt;
	
			NumberFormat nf = NumberFormat.getInstance();
			nf.setGroupingUsed(false);
			nf.setMaximumIntegerDigits(12);	
			nf.setMinimumIntegerDigits(12);
				
		  for(int p=0;p<M;p++) {
			 
			  tt=(int)code[p][1];
			  
			  resurt = tt*1000000 + (int)code[p][3];
		
			  System.out.println(nf.format(resurt));
		  }
		
			  s.close();
		  
	}
}

Compiler output:
Main.java:22: error: cannot find symbol
Arrays.sort(code,0,M,new Comparator<int[]>() {
                         ^
  symbol:   class Comparator
  location: class Main
Main.java:48: error: cannot find symbol
	Arrays.sort(code,0,M,new Comparator<int[]>() { 
	                         ^
  symbol:   class Comparator
  location: class Main
2 errors
Language: Java


import java.text.NumberFormat;
import java.util.Arrays;
import java.util.Scanner;

public class Main{
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		  
		  int N;
		  int M;
		  N = s.nextInt();
		  M = s.nextInt();
		  int code[][] = new int[M][4];
		  for(int i=0;i<M;i++) {
			  code[i][0]=i; 
			  code[i][1]=s.nextInt();
			  code[i][2]=s.nextInt();
			  code[i][3]=0;
		  }

Arrays.sort(code,0,M,new Comparator<int[]>() { 
public int compare(int[] k, int[] l) {
 if(k[1] < l[1]){
 return -1;
 } else if(k[1] > l[1]){ 
return 1;
 } else { 
	if(k[2] < l[2]) 		
return -1; 	
else if(k[2] > l[2]) 	
	return 1; 
	else 
		return 0; 
}
 } 
		}); 	

	
int temp=0,order=0;
  		for(int i=0;i<M;i++) { 
			int p= code[i][1]; 
    if(temp!=p) { 		
		temp=p; 
		order=1; 	
		} else {
			order++; 	
		} 			
code[i][3]=order; 	
	} 		


Arrays.sort(code,0,M,new Comparator<int[]>() { 
public int compare(int[] k, int[] l) {
 if(k[0] < l[0]){
 return -1;
 } else if(k[0] > l[0]){ 
return 1;
 }else {
		return 0; 
}
 } 
}); 		

		  
		  double resurt;
		  double tt;
	
			NumberFormat nf = NumberFormat.getInstance();
			nf.setGroupingUsed(false);
			nf.setMaximumIntegerDigits(12);	
			nf.setMinimumIntegerDigits(12);
				
		  for(int p=0;p<M;p++) {
			 
			  tt=(int)code[p][1];
			  
			  resurt = tt*1000000 + (int)code[p][3];
			
			  System.out.println(nf.format(resurt));
		  }
		
			  s.close();
		  
	}
}

Compiler output:
Main.java:22: error: cannot find symbol
Arrays.sort(code,0,M,new Comparator<int[]>() { 
                         ^
  symbol:   class Comparator
  location: class Main
Main.java:53: error: cannot find symbol
Arrays.sort(code,0,M,new Comparator<int[]>() { 
                         ^
  symbol:   class Comparator
  location: class Main
2 errors
Language: Java


import java.text.NumberFormat;
import java.util.Arrays;
import java.util.Scanner;

public class Main{
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		  
		  int N;
		  int M;
		  N = s.nextInt();
		  M = s.nextInt();
		  int code[][] = new int[M][4];
		  for(int i=0;i<M;i++) {
			  code[i][0]=i; 
			  code[i][1]=s.nextInt();
			  code[i][2]=s.nextInt();
			  code[i][3]=0;
		  }

Arrays.sort(code,0,M,new Comparator<int[]>() { 
public int compare(int[] k, int[] l) {
 if(k[1] < l[1]){
 return -1;
 } else if(k[1] > l[1]){ 
return 1;
 } else { 
	if(k[2] < l[2]) 		
return -1; 	
else if(k[2] > l[2]) 	
	return 1; 
	else 
		return 0; 
}
 } 
		}); 	

	
int temp=0,order=0;
  		for(int i=0;i<M;i++) { 
			int p= code[i][1]; 
    if(temp!=p) { 		
		temp=p; 
		ychange=1; 	
		} else {
			order++; 	
		} 			
code[i][3]=order; 	
	} 		


Arrays.sort(code,0,M,new Comparator<int[]>() { 
public int compare(int[] k, int[] l) {
 if(k[0] < l[0]){
 return -1;
 } else if(k[0] > l[0]){ 
return 1;
 }else {
		return 0; 
}
 } 
}); 		

		  
		  double resurt;
		  double tt;
	
			NumberFormat nf = NumberFormat.getInstance();
			nf.setGroupingUsed(false);
			nf.setMaximumIntegerDigits(12);	
			nf.setMinimumIntegerDigits(12);
				
		  for(int p=0;p<M;p++) {
			 
			  tt=(int)code[p][1];
			  
			  resurt = tt*1000000 + (int)code[p][3];
			
			  System.out.println(nf.format(resurt));
		  }
		
			  s.close();
		  
	}
}

Compiler output:
Main.java:22: error: cannot find symbol
Arrays.sort(code,0,M,new Comparator<int[]>() { 
                         ^
  symbol:   class Comparator
  location: class Main
Main.java:45: error: cannot find symbol
		ychange=1; 	
		^
  symbol:   variable ychange
  location: class Main
Main.java:53: error: cannot find symbol
Arrays.sort(code,0,M,new Comparator<int[]>() { 
                         ^
  symbol:   class Comparator
  location: class Main
3 errors
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<math.h>
#include<queue>
#include<deque>
#include<stack>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int INF = 1e9;
int main() {
	int N, M;
	cin >> N >> M;
	vector<pii>v(M);
	vector<int>x[100010];
	for (int i = 0; i < M; ++i) {
		int p, y;
		cin >> p >> y;
		v.at(i).first = p;
		v.at(i).second = y;
		x[p].push_back(y);
	}
	for (int i = 1; i <= N; ++i) {
		sort(x[i].begin(), x[i].end());
	}
	for (int i = 0; i < M; ++i) {
		int num;
		for (int j = 0; j < x[v.at(i).first].size(); ++j) {
			if (x[v.at(i).first][j] == v.at(i).second) {
				num = j + 1;
			}
		}
		string newpr = to_string(v.at(i).first);
		string newpl = to_string(num);
		for (int j = 0; j < 6 - newpr.length(); ++j) {
			cout << 0;
		}
		cout << newpr;
		for (int j = 0; j < 6 - newpl.length(); ++j) {
			cout << 0;
		}
		cout << newpl;
		cout << endl;
	}
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:48:18: error: expected '}' at end of input
   48 |         return 0;
      |                  ^
a.cc:14:12: note: to match this '{'
   14 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
#define f first
#define s second
typedef pair<pair<int,int>,pair<int,int> > P;
bool c(P&f,P&s){return f.s.s<s.s.s;}
int main()
{
	int i,n,m,p,y;
	P a[100010];
	cin>>n>>m;
	for(i=0;i<m;i++)
	{
		cin>>p>>y;
		a[i].f.f=p;
		a[i].f.s=y;
		a[i].s.f=0;
		a[i].s.s=i;
	}
	sort(a,a+m);
	p=a[0].f.f;
	for(y=i=0;i<m;i++)
	{
		if(p!=a[i].f.f)p=a[i].f.f,y=0;
		a[i].s.f=++y;
	}
	sort(a,a+m,c);
	for(i=0;i<m;i++)printf("%012ld\n",(long)(a[i].f.f*1e6+a[i].s.f));
}

Compiler output:
a.cc:4:9: error: 'pair' does not name a type
    4 | typedef pair<pair<int,int>,pair<int,int> > P;
      |         ^~~~
a.cc:5:8: error: 'P' was not declared in this scope
    5 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |        ^
a.cc:2:11: error: 'first' was not declared in this scope
    2 | #define f first
      |           ^~~~~
a.cc:5:10: note: in expansion of macro 'f'
    5 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |          ^
a.cc:5:12: error: 'P' was not declared in this scope
    5 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |            ^
a.cc:3:11: error: 'second' was not declared in this scope
    3 | #define s second
      |           ^~~~~~
a.cc:5:14: note: in expansion of macro 's'
    5 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |              ^
a.cc:5:15: error: expression list treated as compound expression in initializer [-fpermissive]
    5 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |               ^
a.cc: In function 'int main()':
a.cc:9:9: error: 'P' was not declared in this scope
    9 |         P a[100010];
      |         ^
a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |         cin>>n>>m;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:17: error: 'a' was not declared in this scope
   14 |                 a[i].f.f=p;
      |                 ^
a.cc:19:14: error: 'a' was not declared in this scope
   19 |         sort(a,a+m);
      |              ^
a.cc:19:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   19 |         sort(a,a+m);
      |         ^~~~
      |         std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
Language: Java

import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

public class CityID {
	static int T, N, M;
	private static final String STR_FORMAT = "000000";

	public static String AddOne(String cid) {
		Integer intHao = Integer.parseInt(cid);
		intHao++;
		DecimalFormat df = new DecimalFormat(STR_FORMAT);
		return df.format(intHao);
	}

	public static String Addzero(String cid) {
		Integer intHao = Integer.parseInt(cid);
		DecimalFormat df = new DecimalFormat(STR_FORMAT);
		return df.format(intHao);
	}

	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;
				for (int i = 0; i < order.length; i++) {
					int k = order[i];
					if (one[k] > two[k]) {
						return 1;
					} else if (one[k] < two[k]) {
						return -1;
					} else {
						continue; // 如果按一条件比较结果相等，就使用第二个条件进行比较。
					}
				}
				return 0;
			}
		});
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		T = sc.nextInt();
		for (int test_case = 1; test_case <= T; test_case++) {
			N = sc.nextInt();
			M = sc.nextInt();

			int array[][] = new int[M][3];

			re[] rt = new re[M];

			for (int i = 0; i < array.length; i++) {
				for (int j = 0; j < 2; j++) {
					array[i][j] = sc.nextInt();

				}
				array[i][2] = i;
				rt[i] = new re();
				rt[i].x = i;

			}

			sort(array, new int[] { 0, 1 }); // 先根据第一列比较，若相同则再比较第二列
			Set<Integer> set = new TreeSet<Integer>();
			for (int i = 0; i < array.length; i++) {
				set.add(array[i][0]);
			}

			Integer[] arr2 = set.toArray(new Integer[0]);
			for (int k = 0; k < arr2.length; k++) {
				// System.out.println(arr2[k]);
				int l = 0;
				for (int i = 0; i < array.length; i++) {
					if (array[i][0] == arr2[k]) {
						// for(int j=0;j<array[i].length;j++)
						// System.out.print(array[i][j]);
						for (int j = 0; j < rt.length; j++) {
							if (rt[j].x == array[i][2]) {
								rt[j].ID = Addzero(arr2[k].toString()) + AddOne(Integer.toString(l));

							}

						}

						// System.out.println(Addzero(arr2[k].toString())+AddOne(Integer.toString(l)));
						l++;
					} else
						l = 0;
				}
			}

			for (int i = 0; i < rt.length; i++) {
				System.out.println(rt[i].ID);

			}

		}

	}

}

class re {
	int x;
	String ID;
}


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