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

/*
ID: espr1t
TASK: 
KEYWORDS: 
*/

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;
FILE* in = stdin; FILE* out = stdout;

const int MAX = 1024;

int n;
double T, A;
double a[MAX];

int main(void) {
	// in = fopen("B.in", "rt");
	
	fscanf(in, "%d", &n);
	fscanf(in, "%lf %lf", &T, &A);
	for (int i = 0; i < n; i++)
	    fscanf(in, "%lf", &a[i]);
	
	int ans = -1;
	double bestDiff = 1e100;
	for (int i = 0; i < n; i++) {
	    double curDiff = fabs(A - (T - a[i] * 0.006));
	    if (bestDiff > curDiff) {
	        bestDiff = curDiff;
	        ans = i;
        }
    }
    fprintf(out, "%d\n", ans + 1);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:30: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   33 |             double curDiff = fabs(A - (T - a[i] * 0.006));
      |                              ^~~~
      |                              labs
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,M;cin>>N>>M;
  vector<vector<int>>A(N);
  vector<int>B(M);
  vector<int>C(M);
  for(int i=0;i<M;i++){
    cin>>B[i]>>C[i];
    A[B[i]].push_back(C[i]);
  }
  for(int i=0;i<N;i++)sort(A[i].begin(),A[i].end());
  for(int i=0;i<M;i++){
    int a=A[B[i]];
    int b=lower_bound(A[B[i]].begin(),A[B[i]].end(),C[i])-A[B[i]].begin()+1;
    cout<<a/100000<<(a/10000)%10<<(a/1000)%10<<(a/100)%10<<(a/10)%10<<a%10<<b/100000<<(b/10000)%10<<(b/1000)%10<<(b/100)%10<<(b/10)%10<<b%10<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} to 'int' in initialization
   14 |     int a=A[B[i]];
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, n) for(int i=0;i<(int)n;i++)
#define PI acos(-1)
#define fast_io ios_base::sync_with_stdio(false) ; cin.tie(0); cout.tie(0);
ll mod=1e9+7;

int main(){
    fast_io

    int n, m;
    cin >> n >> m;
    int P[m];
    int Y[m];
    vector<int> id(1000000);
    rep(i,m) {
        cin >> P[i] >> Y[i];
        id[P[i]].push_back(Y[i]);
    }
    rep(i,n) sort(id[i+1].begin(), id[i+1].end());
    rep(i,m){
        int iter = lower_bound(id[P[i]].begin(), id[P[i]].end(), Y[i]) - id[P[i]].begin();
        ll ans = P[i]*1000000 + iter + 1;
        printf("%012lld\n", ans);
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: request for member 'push_back' in 'id.std::vector<int>::operator[](((std::vector<int>::size_type)P[i]))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   20 |         id[P[i]].push_back(Y[i]);
      |                  ^~~~~~~~~
a.cc:22:27: error: request for member 'begin' in 'id.std::vector<int>::operator[](((std::vector<int>::size_type)(i + 1)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   22 |     rep(i,n) sort(id[i+1].begin(), id[i+1].end());
      |                           ^~~~~
a.cc:22:44: error: request for member 'end' in 'id.std::vector<int>::operator[](((std::vector<int>::size_type)(i + 1)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   22 |     rep(i,n) sort(id[i+1].begin(), id[i+1].end());
      |                                            ^~~
a.cc:24:41: error: request for member 'begin' in 'id.std::vector<int>::operator[](((std::vector<int>::size_type)P[i]))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   24 |         int iter = lower_bound(id[P[i]].begin(), id[P[i]].end(), Y[i]) - id[P[i]].begin();
      |                                         ^~~~~
a.cc:24:59: error: request for member 'end' in 'id.std::vector<int>::operator[](((std::vector<int>::size_type)P[i]))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   24 |         int iter = lower_bound(id[P[i]].begin(), id[P[i]].end(), Y[i]) - id[P[i]].begin();
      |                                                           ^~~
a.cc:24:83: error: request for member 'begin' in 'id.std::vector<int>::operator[](((std::vector<int>::size_type)P[i]))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   24 |         int iter = lower_bound(id[P[i]].begin(), id[P[i]].end(), Y[i]) - id[P[i]].begin();
      |                                                                                   ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> pi;
vector<pi>city;
map<pi,string>hash;
vector<int>establish[100005];

int main(){
	int n,m;
	cin>>n>>m;
	for(int i=0; i<m; i++){
		int a,b;
		cin>>a>>b;
		city.push_back(pi(a,b));
		establish[a].push_back(b);
	}
	for(int i=1; i<=n; i++) sort(establish[i].begin(),establish[i].end());
	for(int i=1; i<=n; i++){
		if(establish[i].size()){
			for(int j=0; j<establish[i].size(); j++){
				int first_id = i;
				int second_id = j+1;
				string s = "000000000000";
				int p = 5;
				while(first_id){
					s[p--] = (first_id%10+'0');
					first_id/=10;
				}
				p = 11;
				while(second_id){
					s[p--] = (second_id%10+'0');
					second_id/=10;
				}
				hash.insert(make_pair(pi(i,establish[i][j]),s));
			}
		}
	}
	for(int i=0; i<city.size(); i++){
		cout<<hash.find(pi(city[i].first,city[i].second))->second<<'\n';
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:33: error: reference to 'hash' is ambiguous
   34 |                                 hash.insert(make_pair(pi(i,establish[i][j]),s));
      |                                 ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:5:15: note:                 'std::map<std::pair<int, int>, std::__cxx11::basic_string<char> > hash'
    5 | map<pi,string>hash;
      |               ^~~~
a.cc:39:23: error: reference to 'hash' is ambiguous
   39 |                 cout<<hash.find(pi(city[i].first,city[i].second))->second<<'\n';
      |                       ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:5:15: note:                 'std::map<std::pair<int, int>, std::__cxx11::basic_string<char> > hash'
    5 | map<pi,string>hash;
      |               ^~~~
Language: C

// lcmとか__builtin_popcountとかはg++ -std=c++17 default.cppみたいなかんじで
// g++ hoge.cpp -std=c++17 -I . でコンパイルできる
// -fsanitize=undefinedでオーバーフロー検出
#include <bits/stdc++.h>
//#include <atcoder/all>

#define mod 1000000007
#define INF LLONG_MAX
#define ll long long
#define ln cout<<endl
#define Yes cout<<"Yes"<<endl
#define NO cout<<"NO"<<endl
#define YES cout<<"YES"<<endl
#define No cout<<"No"<<endl
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
using namespace std;
//using namespace atcoder;
ll dx[4]={1,0,-1,0};
ll dy[4]={0,1,0,-1};
typedef pair<ll,ll> P;
//https://pyteyon.hatenablog.com/entry/2019/03/11/200000#Union-Find-%E6%9C%A8%E3%81%AE%E5%AE%9F%E8%A3%85
// union by size + path having
#include <bits/stdc++.h>
#define ll long long 
using namespace std;
bool comp(pair<ll, ll> a, pair<ll , ll> b) {
    // 基本はfirstで比較
    if(a.first != b.first){
         return a.first < b.first; // 昇順
        //return a.first > b.first; // 降順
    }

    // それ以外はsecondで比較
    if(a.second != b.second){
        return a.second < b.second;
    }else{
        // どちらも同じ
        return true;
    }
}


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

    ll a,b,c,d,m,n,maxi=0,f=0,mini=INF,sum=0;
    ll k;
    ll g,e;
    ll q;
    cin>>n>>m;
    vector<P> p(m);
    vector<P> ps(m);
    rep(i,m){
        cin>>a>>b;
        p[i]=P(a,b);
        ps[i]=P(a,b);

    }
    sort(all(p),comp);
    map<P,ll> mp;

    ll si=p[0].first;
    ll ctr=1;
    rep(i,m){
        if(si!=p[i].first)ctr=1;
            mp[p[i]]=ctr;
            ctr++;
    }
    rep(i,m){
            cout<<setfill('0')<<right<<setw(6)<<ps[i].first<<" ";
            cout<<setfill('0')<<right<<setw(6)<<mp[ps[i]]<<endl;
    }
    return 0;
}


Compiler output:
main.c:4:10: fatal error: bits/stdc++.h: No such file or directory
    4 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
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  <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:20: warning: extra tokens at end of #include directive
    1 | #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);}
      |                    ^
a.cc:1:11: fatal error: cstdio : No such file or directory
    1 | #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);}
      |           ^~~~~~~~~
compilation terminated.
Language: C++

#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define ArraySizeOf(array)     (sizeof(array) / sizeof(array[0]))
#define res(i,n) for(int i=n;;i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,n) for(int i=1;i<n;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define REV(i,n) for(int i=n-1;i>0;i--)
#define req(i,n,m) for(int i=n;i<m;i++)
#define REQ(i,n,m,l) for(int i=n;i<m;i+=l) 
#define _GLIBCXX_DEBUG
int INF = 1e9 + 7;
int mod = 998244353;
long double PI = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998626034825342117;
unsigned NthDayOfWeekToDay(unsigned n, unsigned dow, unsigned dow1)
{
    unsigned day;
    if (dow < dow1) dow += 7;
    day = dow - dow1;
    day += 7 * n - 6;
    return day;
}
signed gcd(long long x, long long y) {
    if (y == 0)return x;
    return gcd(y, x % y);
}
signed lcm(long long x, long long y) {
    return x / gcd(x, y) * y;
}
unsigned DayToWeekNumber(unsigned day)
{
    return (day - 1) / 7 + 1;
}
unsigned AnotherDayOfWeek(unsigned day, unsigned day0, unsigned dow0)
{
    return (dow0 + 35 + day - day0) % 7;
}
using namespace std;
long long z=1000000001;
static const int B[z];
int main() {
    int N, M; cin >> N >> M;
    vector<pair<int,int>>A(M);
    vector<int>P(M);
    vector<int>Y(M);
    rep(i, M) {
        int a, b; cin >> a >> b;
        A[i].first = a;
        A[i].second = b;
        P[i] = a;
        Y[i] = b;
        B[Y[i]]=i;
    }
    sort(A.begin(), A.end());
    int count = 0;
    vector<string>S(M,"            ");
    rep(i, M) {
        if (i != 0) {
            if (A[i].first != A[i - 1].first) {
                count = 0;
            }
        }
        count++;
        Y[B[A[i].second]] = count;
    }
    rep(i,M){
        cout << P[i] / 100000 << (P[i] % 100000) / 10000 << (P[i] % 10000) / 1000 << (P[i] % 1000) / 100 << (P[i] % 100) / 10 << P[i]% 10 << Y[i] / 100000 << (Y[i] % 100000) / 10000 << (Y[i] % 10000) / 1000 << (Y[i]% 1000) / 100 << (Y[i] % 100) / 10 << Y[i] % 10 << endl;
    }
}

Compiler output:
a.cc:72:20: error: size of array 'B' is not an integral constant-expression
   72 | static const int B[z];
      |                    ^
a.cc:72:18: error: uninitialized 'const B' [-fpermissive]
   72 | static const int B[z];
      |                  ^
a.cc: In function 'int main()':
a.cc:84:16: error: assignment of read-only location 'B[Y.std::vector<int>::operator[](((std::vector<int>::size_type)i))]'
   84 |         B[Y[i]]=i;
      |         ~~~~~~~^~
Language: C++

#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define ArraySizeOf(array)     (sizeof(array) / sizeof(array[0]))
#define res(i,n) for(int i=n;;i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,n) for(int i=1;i<n;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define REV(i,n) for(int i=n-1;i>0;i--)
#define req(i,n,m) for(int i=n;i<m;i++)
#define REQ(i,n,m,l) for(int i=n;i<m;i+=l) 
#define _GLIBCXX_DEBUG
int INF = 1e9 + 7;
int mod = 998244353;
long double PI = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998626034825342117;
unsigned NthDayOfWeekToDay(unsigned n, unsigned dow, unsigned dow1)
{
    unsigned day;
    if (dow < dow1) dow += 7;
    day = dow - dow1;
    day += 7 * n - 6;
    return day;
}
signed gcd(long long x, long long y) {
    if (y == 0)return x;
    return gcd(y, x % y);
}
signed lcm(long long x, long long y) {
    return x / gcd(x, y) * y;
}
unsigned DayToWeekNumber(unsigned day)
{
    return (day - 1) / 7 + 1;
}
unsigned AnotherDayOfWeek(unsigned day, unsigned day0, unsigned dow0)
{
    return (dow0 + 35 + day - day0) % 7;
}
using namespace std;
int main() {
    int N, M; cin >> N >> M;
    vector<pair<int,int>>A(M);
    vector<int>P(M);
    vector<int>Y(M);
    vector<int>B(long long(1000000001));
    rep(i, M) {
        int a, b; cin >> a >> b;
        A[i].first = a;
        A[i].second = b;
        P[i] = a;
        Y[i] = b;
        B[Y[i]]=i;
    }
    sort(A.begin(), A.end());
    int count = 0;
    vector<string>S(M,"            ");
    rep(i, M) {
        if (i != 0) {
            if (A[i].first != A[i - 1].first) {
                count = 0;
            }
        }
        count++;
        Y[B[A[i].second]] = count;
    }
    rep(i,M){
        cout << P[i] / 100000 << (P[i] % 100000) / 10000 << (P[i] % 10000) / 1000 << (P[i] % 1000) / 100 << (P[i] % 100) / 10 << P[i]% 10 << Y[i] / 100000 << (Y[i] % 100000) / 10000 << (Y[i] % 10000) / 1000 << (Y[i]% 1000) / 100 << (Y[i] % 100) / 10 << Y[i] % 10 << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:76:18: error: expected primary-expression before 'long'
   76 |     vector<int>B(long long(1000000001));
      |                  ^~~~
Language: C++

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        long[] a = new long[m];
        long[] d = new long[m];
        int[] g = new int[n];
        HashMap<Long,Integer> b = new HashMap<Long, Integer>();
        HashMap<Long, String> c  = new HashMap<Long, String>();

        for (int i=0;i<m;i++){
            int p = scan.nextInt();
            long y = scan.nextLong();
            b.put(y,p);
            a[i] = y;
            d[i] = y;
        }

        Arrays.sort(a);

        for (int j=0;j<m;j++){
            int p1 = b.get(a[j]);
            int p2 = g[p1-1]+1;
            g[p1-1] += 1;
            String a1 = "";
            String a2 = p1+"";
            String a3 = p2+"";
            for (int k1=0;k1<6-a2.length();k1++){
                a1 += "0";
            }
            a1 += a2;
            for (int k2=0;k2<6-a3.length();k2++){
                a1 += "0";
            }
            a1 += a3;
            c.put(a[j], a1);
        }

        for (int q = 0 ; q<m;q++){
            System.out.println(c.get(d[q]));
        }
    }
}

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

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repi(i,n,init) for(ll i=init;i<(n);i++)
#define ll long long

struct pyst {
    int no;
    int p;
    int y;
    char ans[13];
};

bool comp1(const pyst& a, const pyst& b) {
    if (a.p != b.p) {
        return(a.p < b.p);
    }
    return(a.y < b.y);
}

bool comp2(const pyst& a, const pyst& b) {
    return(a.no < b.no);
}

int main()
{
    int n,m;
    int ans1, ans2;

    cin >> n >> m;
    vector<pyst> py(m);
    rep(i, m) {
        py[i].no = i;
        cin >> py[i].p >> py[i].y;
    }
    sort(py.begin(), py.end(), comp1);
    ans1 = ans2 = 0;
    rep(i,m) {
        if (py[i].p != ans1) {
            ans1 = py[i].p;
            ans2 = 1;
        }
        else {
            ++ans2;
        }
        sprintf_s(py[i].ans, "%06d%06d", ans1, ans2);
    }
    sort(py.begin(), py.end(), comp2);
    rep(i, m) {
        printf("%s\n", py[i].ans);
    }

    return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:9: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
   46 |         sprintf_s(py[i].ans, "%06d%06d", ans1, ans2);
      |         ^~~~~~~~~
      |         sprintf
Language: C++

#include <iostream>
#include <stdio.h>
#include <vector> 
#include <math.h> 
#include <map>
using namespace std;
int main(void){
    int N, M; cin >> N >> M;
    int i = 0;
    int index = 0;
    map<int, vector<int> > m;
    map<int, int> c;
    vector<int> p(M);
    vector<int> y(M);
    while(M > i){
        cin >> p[i] >> y[i];
        m[p[i]].push_back(y[i]);
        i++;
    }
    for (auto itr = m.begin(); itr != m.end(); itr++) {
        sort(itr->second.begin(), itr->second.end());
    }
    i = 0;
    while(M > i){
        string upper = to_string(p[i]);
        vector<int>::iterator itr;
        itr = find(m[p[i]].begin(), m[p[i]].end(), y[i]);
        string lower = to_string(distance(m[p[i]].begin(), itr) + 1);
        while (upper.length() < 6) {
            upper = "0" + upper;
        }
        while (lower.length() < 6) {
            lower = "0" + lower;
        }
        cout << upper + lower  << endl;
        i++;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   21 |         sort(itr->second.begin(), itr->second.end());
      |         ^~~~
      |         sqrt
a.cc:27:19: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   27 |         itr = find(m[p[i]].begin(), m[p[i]].end(), y[i]);
      |               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:27:19: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   27 |         itr = find(m[p[i]].begin(), m[p[i]].end(), y[i]);
      |               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
    // 入力
    int n, m; cin >> n >> m;
    vector<int> P(m), Y(m);
    for (int i = 0; i < m; ++i) cin >> P[i] >> Y[i], --P[i];
    
    // vals[v] := P[i] = v であるような i についての Y[i] の値を集めたもの
    vector<vector<int> > vals(n);
    for (int i = 0; i < m; ++i) vals[P[i]].push_back(Y[i]);
    
    // 各 p の値に対して
    for (int v = 0; v < n; ++v) {
        sort(vals[v].begin(), vals[v].end());
        
        // 今回は不要だが、通常は数のダブりをなくす
        vals[v].erase(unique(vals[v].begin(), vals[v].end()), vals[v].end());
    }

    // 答え
    for (int i = 0; i < m; ++i) {
        int v = P[i];
        printf("%06d", v + 1);
        
        // 座標圧縮して導いた答え
        int id = lower_bound(vals[v].begin(), vals[v].end(), Y[i]);
        printf("%06d\n", id);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:29: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   30 |         int id = lower_bound(vals[v].begin(), vals[v].end(), Y[i]);
      |                  ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                             |
      |                             __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C++

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

int main() {
    // 入力
    int n, m; cin >> n >> m;
    vector<int> P(m), Y(m);
    for (int i = 0; i < m; ++i) cin >> P[i] >> Y[i], --P[i];
    
    // vals[v] := P[i] = v であるような i についての Y[i] の値を集めたもの
    vector<vector<int> > vals(n);
    for (int i = 0; i < m; ++i) vals[P[i]].push_back(Y[i]);
    
    // 各 p の値に対して
    for (int v = 0; v < n; ++v) {
        sort(vals[v].begin(), vals[v].end());
        
        // 今回は不要だが、通常は数のダブりをなくす
        vals[v].erase(unique(vals[v].begin(), vals[v].end()), vals[v].end());
    }

    // 答え
    for (int i = 0; i < m; ++i) {
        int v = P[i];
        printf("%06d", v + 1);
        
        // 座標圧縮して導いた答え
        int id = lower_bound(vals[v].begin(), vals[v].end(), Y[i]);
        printf("%06d\n", id + 1);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:29: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   30 |         int id = lower_bound(vals[v].begin(), vals[v].end(), Y[i]);
      |                  ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                             |
      |                             __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C

#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <utility> 

int main()
{
	int M, N;
    std::cin >> M >> N;
    
	std::map<int, std::map<int, int>> ken_shi_y;
	for(int i=0; i<N; i++)
    {
    	int P, Y;
    	std::cin >> P>> Y;
		ken_shi_y[P][Y] = i;
    }
  		
  	std::vector<std::pair<int,int>> result(N);
  	for(const auto& ken : ken_shi_y)
    {
      int c=1;
      for(const auto& e : ken.second)
      {
 		result[e.second] = std::pair<int,int>(ken.first, c);
        c++;
      }
    }
  
  	for(const auto& e : result)
    {
		std::cout.fill('0');
		std::cout.width(6);      
	    std::cout << e.first;
		std::cout.fill('0');
		std::cout.width(6);      
      	std::cout << e.second << std::endl;
    }
  
	return 0;
}


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

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

int main() {
    // 入力
    int n, m; cin >> n >> m;
    vector<int> P(m), Y(m);
    for (int i = 0; i < m; ++i) cin >> P[i] >> Y[i], --P[i];
    
    // vals[v] := P[i] = v であるような i についての Y[i] の値を集めたもの
    vector<vector<int> > vals(n);
    for (int i = 0; i < m; ++i) vals[P[i]].push_back(Y[i]);
    
    // 各 p の値に対して
    for (int v = 0; v < n; ++v) {
        sort(vals[v].begin(), vals[v].end());
        
        // 今回は不要だが、通常は数のダブりをなくす
        vals[v].erase(unique(vals[v].begin(), vals[v].end()), vals[v].end());
    }

    // 答え
    for (int i = 0; i < m; ++i) {
        int v = P[i];
        printf("%06d", v + 1);
        
        // 座標圧縮して導いた答え
        int id = lower_bound(vals[v].begin(), vals[v].end(), Y[i]) - 1;
        printf("%06d\n", id + 1);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:68: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   30 |         int id = lower_bound(vals[v].begin(), vals[v].end(), Y[i]) - 1;
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
      |                                                                    |
      |                                                                    __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C++

#include<bits/stdc++.h>
using namespace std;
int lg(int a) {
  int k = 1;
  int kj = 10;
  while (a >= kj) {
    k ++;
    kj *= 10;
  }
  return k;
}
int main () {
  int N, M;
  cin >> N >> M;
  vector<tuple<int, int, int>>P(M);
  vector<pair<int, int>>ans(M);
  for (int i = 0; i < M; i ++) {
    int p, x;
    cin >> p >> x;
    P[i] = make_pair(p, x, i);
  }
  sort(P.begin(), P.end());
  int j = 0;
  for (int i = 1; i <= N; i ++) {
    int al = 1;
    while (j < M && get<0>(P[j]) == i) {
      int p, y, kj;
      tie(p, y, kj) = P[j];
      ans[kj] = make_pair(p, al);
      al ++;
      j ++;
    }
  }
  for (int i = 0; i < M; i ++) {
    int p, y;
    tie(p, y) = ans[i];
    int a = lg(p);
    int b = lg(y);
    for (int j = 0; j < a; j ++) cout << 0;
    cout << p;
    for (int j = 0; j < b; j ++) cout << 0;
    cout << y << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: no matching function for call to 'make_pair(int&, int&, int&)'
   20 |     P[i] = make_pair(p, x, i);
      |            ~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:1132:5: note: candidate: 'template<class _T1, class _T2> constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&)'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1132:5: note:   candidate expects 2 arguments, 3 provided
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <functional>
#include <bitset>
#include <cmath>
#include <stack>
#include <iomanip>
#include <map>
#include <math.h>
typedef long long ll;
using namespace std;
const int MOD = 1000000007;

ll GCD(ll a, ll b) { return b ? GCD(b, a%b) : a; }

int N,M;
vector<int> P,Y;

int main()
{
    P.resize(M),Y.resize(M);
    for(int i = 0; i < M; i++) cin >> P[i] >> Y[i], P[i]--;

    vector<vector<int> > vals(N);
    for(int i = 0; i < M; i++) vuls[P[i]].push_back(Y[i]);

    for(int v = 0; v < N; v++)
    {
        sort(vals[v].begin(),vals[v].end());
    }

    for (int i = 0; i < M; ++i) {
        int v = P[i];
        printf("%06d", v + 1);
        
        
        int id = lower_bound(vals[v].begin(), vals[v].end(), Y[i]) - vals[v].begin();
        printf("%06d\n", id + 1);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:32: error: 'vuls' was not declared in this scope; did you mean 'vals'?
   27 |     for(int i = 0; i < M; i++) vuls[P[i]].push_back(Y[i]);
      |                                ^~~~
      |                                vals
Language: C++

#include <iostream>
using namespace std;
int N, M;
pair<int, pair<int, int>> p[100010];
int main() {
    cin >> N >> M;
    for(int i = 0; i < M; ++i) {
        int a, b;
        cin >> a >> b;
        p[i] = make_pair(b, make_pair(a, i));
    }

    sort(p, p + M);
    int cnt[100010] = {};
    pair<int, int> ans[100010];
    for(int i = 0; i < M; ++i) {
        cnt[p[i].second.first]++;
        ans[p[i].second.second] = make_pair(p[i].second.first, cnt[p[i].second.first]);
    }
    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:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(p, p + M);
      |     ^~~~
      |     short
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
int N,M;
int P[100001],Y[100001];
int cnt[100001];
pair<int , int> K[100001];
int main() {
    cin >> N >> M;
    vector<int>vec[100001];
    for(int i = 0; i < M; i++) {
        cin >> P[i] >> Y[i];
        K[P[i]] = P(Y[i],i);
        vec[P[i]].push_back(K[P[i]].first);
    }
    for(int i = 0; i < N; i++) {
        sort(vec[P[i]].begin(),vec[P[i]].end());
    }
    for(int i = 0; i < M; i++) {
        cnt[P[i]]++;
        K[P[i]].second = cnt[P[i]];
        vec[P[i]] = K[P[i]].second;
    }
    for(int i = 0; i < M; i++) {
        printf("%06d","%06d/n",P[i],vec[P[i]]);
    }
}


Compiler output:
a.cc:5:13: error: 'int P [100001]' redeclared as different kind of entity
    5 | int P[100001],Y[100001];
      |             ^
a.cc:3:23: note: previous declaration 'typedef struct std::pair<int, int> P'
    3 | typedef pair<int,int> P;
      |                       ^
a.cc: In function 'int main()':
a.cc:12:17: error: expected primary-expression before '[' token
   12 |         cin >> P[i] >> Y[i];
      |                 ^
a.cc:13:12: error: expected primary-expression before '[' token
   13 |         K[P[i]] = P(Y[i],i);
      |            ^
a.cc:14:14: error: expected primary-expression before '[' token
   14 |         vec[P[i]].push_back(K[P[i]].first);
      |              ^
a.cc:14:32: error: expected primary-expression before '[' token
   14 |         vec[P[i]].push_back(K[P[i]].first);
      |                                ^
a.cc:17:19: error: expected primary-expression before '[' token
   17 |         sort(vec[P[i]].begin(),vec[P[i]].end());
      |                   ^
a.cc:17:37: error: expected primary-expression before '[' token
   17 |         sort(vec[P[i]].begin(),vec[P[i]].end());
      |                                     ^
a.cc:20:14: error: expected primary-expression before '[' token
   20 |         cnt[P[i]]++;
      |              ^
a.cc:21:12: error: expected primary-expression before '[' token
   21 |         K[P[i]].second = cnt[P[i]];
      |            ^
a.cc:21:31: error: expected primary-expression before '[' token
   21 |         K[P[i]].second = cnt[P[i]];
      |                               ^
a.cc:22:14: error: expected primary-expression before '[' token
   22 |         vec[P[i]] = K[P[i]].second;
      |              ^
a.cc:22:24: error: expected primary-expression before '[' token
   22 |         vec[P[i]] = K[P[i]].second;
      |                        ^
a.cc:25:33: error: expected primary-expression before '[' token
   25 |         printf("%06d","%06d/n",P[i],vec[P[i]]);
      |                                 ^
a.cc:25:42: error: expected primary-expression before '[' token
   25 |         printf("%06d","%06d/n",P[i],vec[P[i]]);
      |                                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
int N,M;
int P[100001],Y[100001];
int cnt[100001];
pair<int , int> K[100001];
int main() {
    cin >> N >> M;
    vector<int>vec[100001];
    for(int i = 0; i < M; i++) {
        cin >> P[i] >> Y[i];
        K[P[i]] = PA(Y[i],i);
        vec[P[i]].push_back(K[P[i]].first);
    }
    for(int i = 0; i < N; i++) {
        sort(vec[P[i]].begin(),vec[P[i]].end());
    }
    for(int i = 0; i < M; i++) {
        cnt[P[i]]++;
        K[P[i]].second = cnt[P[i]];
        vec[P[i]] = K[P[i]].second;
    }
    for(int i = 0; i < M; i++) {
        printf("%06d","%06d/n",P[i],vec[P[i]]);
    }
}


Compiler output:
a.cc:5:13: error: 'int P [100001]' redeclared as different kind of entity
    5 | int P[100001],Y[100001];
      |             ^
a.cc:3:23: note: previous declaration 'typedef struct std::pair<int, int> P'
    3 | typedef pair<int,int> P;
      |                       ^
a.cc: In function 'int main()':
a.cc:12:17: error: expected primary-expression before '[' token
   12 |         cin >> P[i] >> Y[i];
      |                 ^
a.cc:13:12: error: expected primary-expression before '[' token
   13 |         K[P[i]] = PA(Y[i],i);
      |            ^
a.cc:13:19: error: 'PA' was not declared in this scope; did you mean 'P'?
   13 |         K[P[i]] = PA(Y[i],i);
      |                   ^~
      |                   P
a.cc:14:14: error: expected primary-expression before '[' token
   14 |         vec[P[i]].push_back(K[P[i]].first);
      |              ^
a.cc:14:32: error: expected primary-expression before '[' token
   14 |         vec[P[i]].push_back(K[P[i]].first);
      |                                ^
a.cc:17:19: error: expected primary-expression before '[' token
   17 |         sort(vec[P[i]].begin(),vec[P[i]].end());
      |                   ^
a.cc:17:37: error: expected primary-expression before '[' token
   17 |         sort(vec[P[i]].begin(),vec[P[i]].end());
      |                                     ^
a.cc:20:14: error: expected primary-expression before '[' token
   20 |         cnt[P[i]]++;
      |              ^
a.cc:21:12: error: expected primary-expression before '[' token
   21 |         K[P[i]].second = cnt[P[i]];
      |            ^
a.cc:21:31: error: expected primary-expression before '[' token
   21 |         K[P[i]].second = cnt[P[i]];
      |                               ^
a.cc:22:14: error: expected primary-expression before '[' token
   22 |         vec[P[i]] = K[P[i]].second;
      |              ^
a.cc:22:24: error: expected primary-expression before '[' token
   22 |         vec[P[i]] = K[P[i]].second;
      |                        ^
a.cc:25:33: error: expected primary-expression before '[' token
   25 |         printf("%06d","%06d/n",P[i],vec[P[i]]);
      |                                 ^
a.cc:25:42: error: expected primary-expression before '[' token
   25 |         printf("%06d","%06d/n",P[i],vec[P[i]]);
      |                                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int N,M;
int P[100001],Y[100001];
int cnt[100001];
pair<int , int> K[100001];
int main() {
    cin >> N >> M;
    vector<int>vec[100001];
    for(int i = 0; i < M; i++) {
        cin >> P[i] >> Y[i];
        K[P[i]].first = Y[i];
        K[P[i]].second = 0;
        vec[P[i]].push_back(K[P[i]].first);
    }
    for(int i = 0; i < N; i++) {
        sort(vec[P[i]].begin(),vec[P[i]].end());
    }
    for(int i = 0; i < M; i++) {
        cnt[P[i]]++;
        K[P[i]].second = cnt[P[i]];
        vec[P[i]] = K[P[i]].second;
    }
    for(int i = 0; i < M; i++) {
        printf("%06d","%06d/n",P[i],vec[P[i]]);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
   22 |         vec[P[i]] = K[P[i]].second;
      |                             ^~~~~~
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Language: C++


#include<bits/stdc++.h>
using namespace std;
int N,M;
int P[100001],Y[100001];
int cnt[100001];
pair<int , int> K[100001];
int main() {
    cin >> N >> M;
    vector<int>vec[100001];
    for(int i = 0; i < M; i++) {
        cin >> P[i] >> Y[i];
        K[P[i]].first = Y[i];
        K[P[i]].second = 0;
        vec[P[i]].push_back(K.first);
    }
    for(int i = 0; i < N; i++) {
        sort(vec[P[i]].begin(),vec[P[i]].end());
    }
    for(int i = 0; i < M; i++) {
        cnt[P[i]]++;
        K[P[i]].second = cnt[P[i]];
        vec[P[i]] = K[P[i]].second;
    }
    for(int i = 0; i < M; i++) {
        printf("%06d","%06d/n",P[i],vec[P[i]]);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: request for member 'first' in 'K', which is of non-class type 'std::pair<int, int> [100001]'
   15 |         vec[P[i]].push_back(K.first);
      |                               ^~~~~
a.cc:23:29: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
   23 |         vec[P[i]] = K[P[i]].second;
      |                             ^~~~~~
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:2:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
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 <bits/stdc++.h>
using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  
  vector<vector<int>> data(N, vector<int>(M));
  vector<vector<int>> number(N, vector<int>(M));
  vector<int> index(M);
  vector<int> n(N);
  int p, y;
  
  int i,j,k;
  
  for(i = 0; i < M; i++){
    cin >> p >> y;
    index[i] = p;
    for(j = 0; j < N; j++){
      if(data[p-1][j] == 0){
        data[p-1][j] = y;
        number[p-1][j] = j;
       // cout << p-1 << j << data[p-1][j] << endl;
        break;
      }
      
    }
  }
  //cout << data[0][0] << endl;
  //cout << data[1][0] << endl;
  //cout << data[0][1] << endl;
  
  for(k = 0; k < N; k++){
  for(i = 0; i < M; i++){
    for(j = M; j > 0; j--){
      if(data[k][j] > 0 && data[k][j-1] > data[k][j]){
        int tmp;
        tmp = data[k][j-1];
        data[k][j-1] = data[k][j];
        data[k][j] = tmp;
        tmp = number[k][j-1];
        number[k][j-1] = number[k][j];
        number[k][j] = tmp;
        // cout << data[k][j] << endl;
      }
    }
  }
  }
  
  //cout << data[0][0] << endl;
  //cout << data[1][0] << endl;
  //cout << data[0][1] << endl;
  
  //cout << number[0][0] << endl;
  //cout << number[0][1] << endl;
  
  for(i = 0;  i < M; i++){
    for(j = 0; index[i] * pow(10, j) < pow(10, 5); j++){
      cout << 0;
    }
    cout << index[i];
    
    
    for(k = 0; data[index[i]-1][number[index[i]-1][n[index[i]-1]]] * pow(10, k) < pow(10, 5); k++){
        cout << 0;
    }
    cout << data[index[i]-1][number[index[i]-1][n[index[i]-1]]] << endl;
    n[index[i]-1]++;
  }

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

N, M = map(int, input().split(' '))

cities = []
for i in range(M):
    p, y = map(int, input().split(' '))
    cities.append([p, y, i])

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

p = cities[0][0]
cnt = 1
for i in range(M):

    if (cities[i][0] == p):
        cities[i].append(str(p).zfill(6) + str(cnt).zfill(6))
        cnt += 1
    else:
        p = cities[i][0]
        cnt = 1
        cities[i].append(str(p).zfill(6) + str(cnt).zfill(6))
        cnt += 1

sorted(cities, key=lambda x: x[2])

for i in range(M):
    print(cities[i][3])


Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N, M = map(int, input().split(' '))
      | ^
Language: C++

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

typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll, ll> Pll;
typedef pair<int, Pii > P1;

#define rep(i,n) for(int i=0;i<n;i++)
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define mp1(a,b,c) P1(a,P(b,c))
#define get_arsize(a) (sizeof(a)/sizeof(a[0]))

const ll MOD = 1000000007;
const double EPS = 1e-10;
const int MAX = 200000;

int main() {
  int n, m;
  cin >> n >> m;
  int p[100000], y[100000];
  vector<ll> yd[100001];
  rep(i,m) {
    int pi, yi;
    cin >> pi >> yi;
    p[i] = pi;
    y[i] = yi;
    yd[pi].push_back(yi);
  }
  //rep (i,m) scanf ("%d%d",&p[i],&y[i]), yd[p[i]].push_back(y[i]);
  rep (i,n) sor(yd[i+1]);
  rep (i,m) {
    auto year = yearList[p[i]];
    int index = int (lb(year, y[i]) - year.begin()) + 1;
    printf ("%012lld\n" , ll (p[i])*1000000+index);
  }
    //printf ("%012lld\n", ll(p[i])*1000000+ int(lb(yd[p[i]], y[i]) - yd[p[i]].begin())+1);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: 'yearList' was not declared in this scope
   37 |     auto year = yearList[p[i]];
      |                 ^~~~~~~~
Language: C++

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

typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll, ll> Pll;
typedef pair<int, Pii > P1;

#define rep(i,n) for(int i=0;i<n;i++)
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define mp1(a,b,c) P1(a,P(b,c))
#define get_arsize(a) (sizeof(a)/sizeof(a[0]))

const ll MOD = 1000000007;
const double EPS = 1e-10;
const int MAX = 200000;

int main() {
  int n, m;
  cin >> n >> m;
  int p[100000], y[100000];
  vector<ll> yd[100001];
  rep(i,m) {
    int pi, yi;
    cin >> pi >> yi;
    p[i] = pi;
    y[i] = yi;
    yearList[pi].push_back(yi);
  }
  //rep (i,m) scanf ("%d%d",&p[i],&y[i]), yd[p[i]].push_back(y[i]);
  rep (i,n) sor(yd[i+1]);
  rep (i,m) printf ("%012lld\n", ll(p[i])*1000000+ int(lb(yd[p[i]], y[i]) - yd[p[i]].begin())+1);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:5: error: 'yearList' was not declared in this scope
   32 |     yearList[pi].push_back(yi);
      |     ^~~~~~~~