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

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

int main(){
	int N , M;
	cin >> N >> M;
	vector<pair<int,pair<int,int>> PY(M);
	for(int i=0;i<M;i++){
		cin >> PY[i].first >> PY[i].second.first;
		PY[i].second.second = i;
	}
	sort(PY.begin(),PY.end());
	long long int ans[M];
	int pre = PY[0].first;
	int index = 0;
	for(int i=0;i<M;i++){
		if(pre == PY[i].first){
			index++;
		}else{
			index = 1;
			pre = PY[i].first;
		}
		int j = PY[i].second.second;
		long long ANS = PY[i].first*1000000 + index;
		ans[j] = ANS;
	}
	for(int i=0;i<M;i++)printf("012%lld\n",ans[i]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:44: error: template argument 1 is invalid
    7 |         vector<pair<int,pair<int,int>> PY(M);
      |                                            ^
a.cc:7:44: error: template argument 2 is invalid
a.cc:9:24: error: 'PY' was not declared in this scope
    9 |                 cin >> PY[i].first >> PY[i].second.first;
      |                        ^~
a.cc:12:14: error: 'PY' was not declared in this scope
   12 |         sort(PY.begin(),PY.end());
      |              ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin>>n>>m;
  vector<int> p(m);
  vector<int> y(m);
  vector<int> py[100001];
  for(int i=0;i<m;i++){
    cin>>p[i]>>y[i];
    py[p[i]].push_back(y[i]);
  }
  for(int i=0;i<n;i++){
    sort(i+1).begin(),py[i+1].end());
  }
  for(int i=0;i<m;i++){
    printf("%06d%06d\n",p[i],(lower_bound(py[p[i]].begin(),py[p[i]].end(),y[i]))-py[p[i]].begin()+1);
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: no matching function for call to 'sort(int)'
   14 |     sort(i+1).begin(),py[i+1].end());
      |     ~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

int N,M;
int p[100000],y[100000];
vector<vector<int>> yd(100001,vector<int>(100001));

int main() {
  cin>>N>>M;
  
  for(int i=0;i<M;++i){
    cin>>p[i]>>y[i];
    yd[p[i]].push_back(y[i]);
  }
  
  for(int i=0;i<N;++i){
    sort(yd[i+1].begin(),yd[i+1].end());
  }
  
  for(int i=0;i<M;++i){
    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:27:90: error: 'Y' was not declared in this scope
   27 |     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);
      |                                                                                          ^
Language: C++

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

int N,M;
int p[100000],y[100000];
vector<vector<int>> yd(100001,vector<int>(100001));

int main() {
  cin>>N>>M;
  
  for(int i=0;i<M;++i){
    cin>>p[i]>>y[i];
    yd[p[i]].push_back(y[i]);
  }
  
  for(int i=0;i<N;++i){
    sort(yd[i+1].begin(),yd[i+1].end());
  }
  
  for(int i=0;i<M;++i){
    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:27:60: error: 'P' was not declared in this scope
   27 |     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);
      |                                                            ^
a.cc:27:90: error: 'Y' was not declared in this scope
   27 |     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);
      |                                                                                          ^
Language: C++

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

int N,M;
int p[100000],y[100000];
vector<vector<int>> yd(100001,vector<int>(100001));

int main() {
  cin>>N>>M;
  
  for(int i=0;i<M;++i){
    cin>>p[i]>>y[i];
    yd[p[i]].push_back(y[i]);
  }
  
  for(int i=0;i<N;++i){
    sort(yd[i+1].begin(),yd[i+1].end());
  }
  
  for(int i=0;i<M;++i){
    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:27:27: error: 'P' was not declared in this scope
   27 |     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);
      |                           ^
a.cc:27:90: error: 'Y' was not declared in this scope
   27 |     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);
      |                                                                                          ^
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:1:19: 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++)
      |                   ^
a.cc:2:35: error: 'vector' does not name a type
    2 | int N,M; int P[100000],Y[100000]; vector <int> yd[100001];
      |                                   ^~~~~~
a.cc: In function 'int main()':
a.cc:3:39: error: 'i' was not declared in this scope
    3 | 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); }
      |                                       ^
a.cc:3:35: error: 'rep' was not declared in this scope
    3 | 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); }
      |                                   ^~~
Language: C++

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

int N,M;
int p[100000],y[100000];
vector<int> yd(100001);

int main() {
  cin>>N>>M;
  
  for(int i=0;i<M;++i){
    cin>>p[i]>>y[i];
    yd[p[i]].push_back(y[i]);
  }
  
  for(int i=0;i<N;++i){
    sort(yd[i+1].begin(),yd[i+1].end());
  }
  
  for(int i=0;i<M;++i){
    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:19:14: error: request for member 'push_back' in 'yd.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'}
   19 |     yd[p[i]].push_back(y[i]);
      |              ^~~~~~~~~
a.cc:23:18: error: request for member 'begin' in 'yd.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'}
   23 |     sort(yd[i+1].begin(),yd[i+1].end());
      |                  ^~~~~
a.cc:23:34: error: request for member 'end' in 'yd.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'}
   23 |     sort(yd[i+1].begin(),yd[i+1].end());
      |                                  ^~~
a.cc:27:27: error: 'P' was not declared in this scope
   27 |     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);
      |                           ^
a.cc:27:90: error: 'Y' was not declared in this scope
   27 |     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);
      |                                                                                          ^
Language: C++

#include <iostream>
#include <cstdio> 
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;

int N,M;
int p[100000],y[100000];
vector<int> yd(100001);

int main() {
  cin>>N>>M;
  
  for(int i=0;i<M;++i){
    cin>>p[i]>>y[i];
    yd[p[i]].push_back(y[i]);
  }
  
  for(int i=0;i<N;++i){
    sort(yd[i+1].begin(),yd[i+1].end());
  }
  
  for(int i=0;i<M;++i){
    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:18:14: error: request for member 'push_back' in 'yd.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'}
   18 |     yd[p[i]].push_back(y[i]);
      |              ^~~~~~~~~
a.cc:22:18: error: request for member 'begin' in 'yd.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 |     sort(yd[i+1].begin(),yd[i+1].end());
      |                  ^~~~~
a.cc:22:34: error: request for member 'end' in 'yd.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 |     sort(yd[i+1].begin(),yd[i+1].end());
      |                                  ^~~
a.cc:26:27: error: 'P' was not declared in this scope
   26 |     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);
      |                           ^
a.cc:26:24: error: 'll' was not declared in this scope
   26 |     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);
      |                        ^~
a.cc:26:90: error: 'Y' was not declared in this scope
   26 |     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);
      |                                                                                          ^
Language: C++

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

int N,M;
int p[100000],y[100000];
vector<int> yd(100001);

int main() {
  cin>>N>>M;
  
  for(int i=0;i<M;++i){
    cin>>p[i]>>y[i];
    yd[p[i]].push_back(y[i]);
  }
  
  for(int i=0;i<N;++i){
    sort(yd[i+1].begin(),yd[i+1].end());
  }
  
  for(int i=0;i<M;++i){
    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:17:14: error: request for member 'push_back' in 'yd.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'}
   17 |     yd[p[i]].push_back(y[i]);
      |              ^~~~~~~~~
a.cc:21:18: error: request for member 'begin' in 'yd.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'}
   21 |     sort(yd[i+1].begin(),yd[i+1].end());
      |                  ^~~~~
a.cc:21:34: error: request for member 'end' in 'yd.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'}
   21 |     sort(yd[i+1].begin(),yd[i+1].end());
      |                                  ^~~
a.cc:25:27: error: 'P' was not declared in this scope
   25 |     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);
      |                           ^
a.cc:25:24: error: 'll' was not declared in this scope
   25 |     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);
      |                        ^~
a.cc:25:90: error: 'Y' was not declared in this scope
   25 |     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);
      |                                                                                          ^
Language: C++

#include "stdafx.h"
#include "iostream"
#include <vector>
#include <cstdlib>
#include<algorithm>
#include<string>
typedef long long ll;
#define rep(i,n) for(int i = 0; i < n ; i++)

using namespace std;
void mondai3();
vector<pair<int, pair<int, int>>> sort(vector<pair<int, pair<int, int>>>);
vector<pair<int, pair<int, int>>> ranking(vector<pair<int, pair<int, int>>>,int);
int getDigit(int);
string createID(pair<int, pair<int, int>> ,int);

int N, M,n;
int P[100000], Y[100000];

int main()
{
	mondai3();

	cin >> n;
	return 0;
}

void mondai1() {
	int aTob, bToc,fare;
	cin >> aTob >> bToc;
	
	fare = aTob + bToc/2;

	cout << fare;
	
}

void mondai2() {
	vector<int> h;
	int n, t, a,htmp,average,diff,point;
	int minDiff = 1000000000;
	int x;
	
	cin >> n; //建設予定地の候補数
	cin >> t >> a;
	for (int i = 0; i < n; i++) {
		cin >> htmp;
		h.push_back(htmp);
	}


	point = 100;
	for (int i = 0; i < h.size(); i++) {
		average = 1000 *t - h[i] *6;//平均温度
		diff = average - 1000 * a; //平均温度と理想の温度の差

		if (minDiff > abs(diff)) {
			minDiff = abs(diff);
			point = i;
		}

		
	}
	cout << point + 1;
}

void mondai3() {
	/*cin >> N >> M;;
	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);
	}*/
	int stopper;
	vector<pair<int, pair<int, int>>> py;
	cin >> N >> M;
	py.resize(M);
	rep(i, M) {
		cin >> py[i].second.first >> py[i].first;
		py[i].second.second = i;
	}

	//cout << createID(py[0], 1) << "\n";
	//cout << "STOP";
	//cin >> n;

	py = sort(py);
	
	py = ranking(py,N);
	rep(i, py.size()) {
		rep(j, py.size()){
			if (py[j].second.second == i) {
				cout << createID(py[j], py[j].first) << "\n";
			}
		}
	}

}

vector<pair<int, pair<int, int>>> sort(vector<pair<int, pair<int, int>>> py) {
	pair<int ,pair<int,int>> tmp;
	for(int j = 0 ; j < py.size() - 1 ; ++j){
		for (int i = 0; i < py.size() -i; i++) {
			if (py[i].first > py[i + 1].first) {
				tmp = py[i];
				py[i] = py[i + 1];
				py[i + 1] = tmp;
			}
		}
	}

	return py;
}

int getDigit(int num) {
	int digit = 0;
	while (num != 0) {
		num = num / 10;
		digit++;
	}
	return digit;
}

string createID(pair<int, pair<int, int>> py , int num) {
	string uppersix, downersix;
	int digitupper,digitdowner;
	digitupper =getDigit( py.second.first);
	rep(i, 6 - digitupper) {
		uppersix += "0";
	}
	uppersix += to_string(py.second.first);

	digitdowner = getDigit(num);
	rep(i, 6 - digitdowner) {
		downersix += "0";
	}
	downersix += to_string(num);

	return uppersix + downersix;
}
vector<pair<int, pair<int, int>>> ranking(vector<pair<int, pair<int, int>>> py, int N) {
	rep(j, N) {
		int rank = 0;
		rep(i, py.size()) {
			if (py[i].second.first == j + 1) {
				py[i].first = rank + 1;
				rank++;
			}
		}
	}
	return py;
}



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

#include<stdio.h>

int main(void){
  long long int N,M;
  scanf("%lld %lld",&N,&M);

  long long int P[N],Y[M],count[M];
  for(int j=0;j<M;j++){
    scanf("%lld %lld",&P[j],&Y[j]);
  };
  for(int k=0;k<M;k++){
    counk[k]=1;
 for(int j=0;j<M;j++){
      if(P[k]==P[j] && Y[k] > Y[j]){
	    count[k]++;
	  };
	};
	};
  for(int k=0;k<M;k++){
printf("%06lld%06lld\n",P[k],count[k]);
  };
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:5: error: 'counk' undeclared (first use in this function); did you mean 'count'?
   12 |     counk[k]=1;
      |     ^~~~~
      |     count
main.c:12:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int N, M;
vector<int> cnt;
vector<pair<int,int>> id;
typedef pair<int,pair<int, int>> tp;
vector<tp> P;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cin >> N >> M;
	REP(i, N) {
		cnt.push_back(1);
	}
	REP(i, M) {
		int p, y;
		cin >> p >> y;	
    id.push_back(make_pair(p,0));
	P.push_back(make_pair(y,make_pair(p, i)));

	}
	sort ( P.begin(), P.end());

	REP(i, M) {
		id[P[i].second.second].second = cnt[P[i].second.first - 1]++;
	}

	REP(i, M) {
		printf("%06d%06d\n", id.first, id.second);
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:41: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
   32 |                 printf("%06d%06d\n", id.first, id.second);
      |                                         ^~~~~
a.cc:32:51: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
   32 |                 printf("%06d%06d\n", id.first, id.second);
      |                                                   ^~~~~~
Language: C++

#include<iostream>
#include <complex>
#include <vector>
#include<string>
#include<cmath>
#include<algorithm>
#include<list>
#include <iterator>
#include <utility>
#include <numeric>
#include < map>
#include <iomanip>
#include <sstream>
using namespace std;

#define intt long long




int main() {

	int N, M;
	map<int, int> mdata;
	map<int, int> yi;
	vector<vector<int>> pi;
	vector<pair<int, int>> ans;
	
	cin >> N >> M;

	pi.resize(N);
	ans.resize(M);

	int p, y;
	for(int i = 0;i < M; i++){
		cin >> p >> y;
		yi.insert(make_pair(y,i));
		pi[p-1].push_back(y);

	}
	for (int i = 0; i < N; i++) {
		if (pi[i].empty() != true) {
			sort(pi[i].begin(), pi[i].end());
			for (int j = 0; j < pi[i].size();j++) {
				ans[yi.at(pi[i][j])].first = i + 1;
				ans[yi.at(pi[i][j])].second = j + 1;
			}
		}
	}

	
	string s1, s2;
	for (int i = 0; i < M; i++) {
		ostringstream sout1, sout2;
		sout1 << std::setfill('0') << std::setw(6) << ans[i].first;
		sout2 << std::setfill('0') << std::setw(6) << ans[i].second;

		s1 = sout1.str();
		s2 = sout2.str();
		cout << s1 << s2 << endl;
	}

	return 0;

}

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

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

struct hoge {
    int p;
    int y;
    int id;
};

int main(){
    int n, m;
    scanf("%d %d", &n, &m);
    vector<hoge> ds(m);
    vector<hoge*> ps(m);
    for(int i=0; i<m; i++) {
        scanf("%d %d", &ds[i].p, &ds[i].y;
        ps[i] = &ds[i];
    }
    sort(ps.begin(), ps.end(), [](hoge *a, hoge *b){return a->p<b->p || (a->p==b->p && a->y<b->y);});
    int id = 0;
    for(int i=0; i<m; i++) {
        if(i==0 || ps[i]->p!=ps[i-1]->p) id = 0;
        ps[i]->id = ++id;
    }
    for(int i=0; i<m; i++) {
        printf("%06d%06d\n", ds[i].p, ds[i].id);
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:42: error: expected ')' before ';' token
   19 |         scanf("%d %d", &ds[i].p, &ds[i].y;
      |              ~                           ^
      |                                          )
Language: C

#include<stdio.h>

int main(){
	int N , M;
	scanf("%d%d",&N,&M);
	int data[M][4];
	for(int i=0;i<M;i++){
		data[i][0] = i;
		scanf("%d%d",&data[i][1],&data[i][2]);
	}
	int med3(int x, int y, int z) {
		if (x < y) {
			if (y < z) return y; else if (z < x) return x; else return z;
		} else {
			if (z < y) return y; else if (x < z) return x; else return z;
		}
	}

	void quicksort(int a[][4], int left, int right) {
		if (left < right) {
			int i = left, j = right;
			int tmp, pivot = med3(a[i][2], a[i + (j - i) / 2][2], a[j][2]);
			while (1) {
				while (a[i][2] < pivot) i++;
				while (pivot < a[j][2]) j--;
				if (i >= j) break;
				tmp = a[i][0]; a[i][0] = a[j][0]; a[j][0] = tmp;
				tmp = a[i][1]; a[i][1] = a[j][1]; a[j][1] = tmp;
				tmp = a[i][2]; a[i][2] = a[j][2]; a[j][2] = tmp;
				i++; j--;
			}
			quicksort(a, left, i - 1);
			quicksort(a, j + 1, right);
		}
	}
	quicksort(data,0,M-1);
	int ansp[M];
	int ansy[M];
	int index[N];
	for(int k=0;k<M;k++){
		int num = data[k][0];
		int pre = data[k][1]
		ansp[num] = pre;
		index[pre]++;
		ansy[num] = index[pre];
	}
	for(int k=0;k<M;k++){
		printf("%06d%06d\n",ansp[k],ansy[k]);
	}
}

Compiler output:
main.c: In function 'main':
main.c:43:17: error: expected ',' or ';' before 'ansp'
   43 |                 ansp[num] = pre;
      |                 ^~~~
Language: C

#include<stdio.h>

int main(){
	int N , M;
	scanf("%d",&N,&M);
	int data[M][4];
	for(int i=0;i<M;i++){
		data[i][0] = i;
		scanf("%d%d",&data[i][1],&data[i][2]);
	}
	int med3(int x, int y, int z) {
		if (x < y) {
			if (y < z) return y; else if (z < x) return x; else return z;
		} else {
			if (z < y) return y; else if (x < z) return x; else return z;
		}
	}

	void quicksort(int a[][], int left, int right) {
		if (left < right) {
			int i = left, j = right;
			int tmp, pivot = med3(a[i][2], a[i + (j - i) / 2][2], a[j][2]);
			while (1) {
				while (a[i][2] < pivot) i++;
				while (pivot < a[j][2]) j--;
				if (i >= j) break;
				tmp = a[i][0]; a[i][0] = a[j][0]; a[j][0] = tmp;
				tmp = a[i][1]; a[i][1] = a[j][1]; a[j][1] = tmp;
				tmp = a[i][2]; a[i][2] = a[j][2]; a[j][2] = tmp;
				i++; j--;
			}
			quicksort(a, left, i - 1);
			quicksort(a, j + 1, right);
		}
	}
	quicksort(data,0,M-1);
	int ansp[M];
	int ansy[M];
	int index[N];
	for(int k=0;k<M;k++){
		int num = data[k][0];
		int pre = data[k][1]
		ansp[num] = pre;
		index[pre]++;
		ansy[num] = index[pre];
	}
	for(int k=0;k<M;k++){
		printf("%06d%06d\n",ansp[k],ansy[k]);
	}
}

Compiler output:
main.c: In function 'main':
main.c:19:28: error: array type has incomplete element type 'int[]'
   19 |         void quicksort(int a[][], int left, int right) {
      |                            ^
main.c:19:28: note: declaration of 'a' as multidimensional array must have bounds for all dimensions except the first
main.c: In function 'quicksort':
main.c:32:35: error: type of formal parameter 1 is incomplete
   32 |                         quicksort(a, left, i - 1);
      |                                   ^
main.c:33:35: error: type of formal parameter 1 is incomplete
   33 |                         quicksort(a, j + 1, right);
      |                                   ^
main.c: In function 'main':
main.c:36:19: error: type of formal parameter 1 is incomplete
   36 |         quicksort(data,0,M-1);
      |                   ^~~~
main.c:43:17: error: expected ',' or ';' before 'ansp'
   43 |                 ansp[num] = pre;
      |                 ^~~~
Language: C++


fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}
fn main(){
    let (n,m) = {
        let t = read_vec::<i64>();
        (t[0],t[1])
    };
    let pmym = read_vec2::<i64>(m as u32);
    let mut test = vec!["".to_string();m as usize];
    let mut sub:Vec<_> = pmym.clone().into_iter().enumerate().map(|x|(x.1,x.0)).collect();
    // sub.sort_by_key(|k| k.1[1]);
    sub.sort();
    println!("{:?}",sub);
    let mut b_key = 0;
    let mut c = 0;
    for (v,k) in sub{
        if b_key != v[0] {
            c = 1;
        }else {
            c += 1;
        }
        test[k] = format!("{:>06}{:>06}",v[0],c);
        b_key = v[0]
    }
    for v in test{
        println!("{}",v);
    }
}

Compiler output:
a.cc:15:6: error: too many decimal points in number
   15 |     (0..n).map(|_| read_vec()).collect()
      |      ^~~~
a.cc:2:1: error: 'fn' does not name a type
    2 | fn read<T: std::str::FromStr>() -> T {
      | ^~
a.cc:8:1: error: 'fn' does not name a type
    8 | fn read_vec<T: std::str::FromStr>() -> Vec<T> {
      | ^~
a.cc:14:1: error: 'fn' does not name a type
   14 | fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
      | ^~
a.cc:17:1: error: 'fn' does not name a type
   17 | fn main(){
      | ^~
Language: C++

#include <bits/stdc++.h>

typedef long long ll;
// #define int int_fast64_t
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 999999999
#define DEBUG(s) cout << s << endl
// typedef int_fast64_t int;

using namespace std;

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

    vector<pair<pair<int, int>, int>> P(m);
    REP(i, m) {
        cin >> P[i].first.first >> P[i].first.second;
        P[i].second = i;
    }
    sort(P.begin(), P.end());

    vector<pair<int, int>> D;
    int c(0), p(0), q(0);
    for (auto i : P) {
        if (q != i.first.first)
            q = i.first.first, p = c;
        c++;
        D.emplace_back(i.second, i.first.first * 1000000 + c - p);
    }
    sort(D.begin(), D.end());

    for (auto i : D)
        cout << swet(5) << setfill('0') << i.second;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:17: error: 'swet' was not declared in this scope
   36 |         cout << swet(5) << setfill('0') << i.second;
      |                 ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define int long long
#define double long double
using namespace std;

signed main() {
	int n, t, a;
	cin >> n >> t >> a;
	vector<int> h;
	for (int i = 0; i < n; i++) {
		int in;
		cin >> in;
		h.push_back(in);
	}
	int ans = 0;
	double p = fabs(t - h[0]*0.006 - a);
	for (int i = 1; i < n; i++) {
		double q = fabs(t - h[i]*0.006 - a);
		if (q < p) {
			p = q;
			ans = i;
		}
	}
	cout << ans + 1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   18 |         double p = fabs(t - h[0]*0.006 - a);
      |                    ^~~~
      |                    labs
Language: C++

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

Compiler output:
a.cc:56:8: error: redefinition of 'struct city'
   56 | struct city {
      |        ^~~~
a.cc:12:8: note: previous definition of 'struct city'
   12 | struct city {
      |        ^~~~
a.cc:61:5: error: redefinition of 'int main()'
   61 | int main() {
      |     ^~~~
a.cc:17:5: note: 'int main()' previously defined here
   17 | int main() {
      |     ^~~~
Language: C++

#include<iostream>
#include<cstring>
using namespace std;

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

        string ans="";
        int count=0;
        for(int i=1; i<=n; i++){
                for(int j=0; j<m; j++){
                        if(p[i]==i){
                                count++;
                                for(int k=0; k<6-strlen(to_string(i)); k++)ans+="0";
                                ans+=to_string(i);
                                for(int k=0; k<6-strlen(to_string(count)); k++)ans+="0";
                                ans+=to_string(count);
                                cout << ans << endl;
                                ans="";
                        }
                }
                count=0;
        }

        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:66: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   17 |                                 for(int k=0; k<6-strlen(to_string(i)); k++)ans+="0";
      |                                                         ~~~~~~~~~^~~
      |                                                                  |
      |                                                                  std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:19:66: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   19 |                                 for(int k=0; k<6-strlen(to_string(count)); k++)ans+="0";
      |                                                         ~~~~~~~~~^~~~~~~
      |                                                                  |
      |                                                                  std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: Java

import java.util.*;

public class ABC113C {

	public static void main(String[] args) {
		new ABC113C().execute();
	}

	private void execute() {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();
		final int M = sc.nextInt();

		int[] prefs = new int[M];
		int[] years = new int[M];
		Map<Integer, Integer> yearPref = new HashMap<>();
		Map<Integer, Integer> order = new HashMap<>();
		Map<Integer, String> cityNumbers = new HashMap<>();


		for (int i = 0; i < M; i++) {
			prefs[i] = sc.nextInt();
			years[i] = sc.nextInt();
			yearPref.put(years[i], prefs[i]);
		}
		
		int [] ys = years.clone();
		Arrays.sort(ys);		
		for (int i =0; i<ys.length; i++) {
			int y = ys[i];
			int p = yearPref.get(y);
			if(!order.containsKey(p)) {
				order.put(p, 0);
			}
			int ord = order.get(p) + 1;
			order.put(p, ord);
			String cityNum = 
					String.format("%06d", p) + 
					String.format("%06d", ord);
			cityNumbers.put(y, cityNum);
		}
		
		for (int i = 0; i < M; i++) {
			System.out.println(cityNumbers.get(years[i]));
		}
		sc.close();
	}

}


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

#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;
typedef long long int ll;
#define all(x) x.begin(),x.end()

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

  for (int i = 0; i < m; ++i) {
    cin >> city[i].first.second >> city[i].first.first;
    city[i].second = i;
  }
  sort(all(city));
  for (int i = 0; i < m; ++i) {
    y[city[i].first.second] += 1;
    ans[city[i].second].first = city[i].first.second;
    ans[city[i].second].second = y[city[i].first.second];
  }
  for (int i = 0; i < m; ++i) {
    printf("%06d%06d\n", ans[i].first, ans[i].second);
  }

  return 0;
}
#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;
typedef long long int ll;
#define all(x) x.begin(),x.end()

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

  for (int i = 0; i < m; ++i) {
    cin >> city[i].first.second >> city[i].first.first;
    city[i].second = i;
  }
  sort(all(city));
  for (int i = 0; i < m; ++i) {
    y[city[i].first.second] += 1;
    ans[city[i].second].first = city[i].first.second;
    ans[city[i].second].second = y[city[i].first.second];
  }
  for (int i = 0; i < m; ++i) {
    printf("%06d%06d\n", ans[i].first, ans[i].second);
  }

  return 0;
}


Compiler output:
a.cc:46:5: error: redefinition of 'int main()'
   46 | int main()
      |     ^~~~
a.cc:10:5: note: 'int main()' previously defined here
   10 | int main()
      |     ^~~~
Language: C++

/* ---------- STL Libraries ---------- */
// IO library
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iostream>

// algorithm library
#include <algorithm>
#include <cmath>
#include <numeric>
#include <random>

// container library
#include <array>
#include <bitset>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>

/* ---------- Namespace ---------- */
using namespace std;

/* ---------- Type Abbreviation ---------- */
using ll = long long;

/* ---------- Constants ---------- */
const ll MOD = 1e9 + 7;
// const int INF = 1 << 25;
// const ll INF = 1LL << 50;
// const double PI = acos(-1);
// const double EPS = 1e-10;
// mt19937 mert(LL(time(0)));

/* ---------- Short Functions ---------- */
template <typename T>
T gcd(T a, T b) {
    if (a > b) return gcd(b, a);
    return a == 0 ? b : gcd(b % a, a);
}

template <typename T, typename U>
T mypow(T b, U n) {
    if (n == 0) return 1;
    if (n == 1) return b /* % MOD */;
    if (n % 2 == 0) {
        return mypow(b * b /* % MOD */, n / 2);
    } else {
        return mypow(b, n - 1) * b /* % MOD */;
    }
}

/* v-v-v-v-v-v-v-v-v Main Part v-v-v-v-v-v-v-v-v */

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

    tuple<int, int, int> cities[M];

    for (int i = 0; i < M; i++) {
        int p, y;
        cin >> p >> y;
        cities[i] = make_tuple(y, p, i);
    }

    sort(cities, cities + M);

    int pref[N+1];
    memset(pref, 0, sizeof(pref));
    pair<int, int> pairs[M];

    for (int i = 0; i < M; i++) {
        tuple<int, int, int> city = cities[i];
        int year, pre, idx;
        tie(year, pre, idx) = city;
        pref[pre]++;
        pairs[idx] = make_pair(pre, pref[pre]);
    }

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

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:75:5: error: 'memset' was not declared in this scope
   75 |     memset(pref, 0, sizeof(pref));
      |     ^~~~~~
a.cc:22:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   21 | #include <set>
  +++ |+#include <cstring>
   22 | #include <string>
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,m;
struct Node{
	int x,y,num;
}Edge[100005];

bool cmp(Node a,Node b){
	if(a.x == b.x){
		return a.y < b.y;
	}
	return a.x < b.x;
}

bool cmp1(Node a,Node b){
	return a.num < b.num;
}

int main()
{
	scanf("%d%d",&n,&m);
	for(int i=0;i<m;i++){
		scanf("%d%d",&Edge[i].x,&Edge[i].y);
		Edge[i].num = i;
	}
	sort(Edge,Edge+m,cmp);
	int num = 1;
	for(int i=0;i<m-1;i++){
		if(Edge[i].x == Edge[i+1].x){
			Edge[i].y = num++;
		}
		else{
			Edge[i].y = num;
			num = 1;
		}
	}
	if(Edge[m-1].x == Edge[m-1].x) Edge[m-1].y = num;
	else Edge[m-1].y = ++num;
	sort(Edge,Edge+m,cmp1);
	for(int i=0;i<m;i++){
		char str[15];
		itoa(Edge[i].x, str, 10);
		int len = strlen(str);
		if(len < 6){
			for(int j=0;j<6-len;j++){
				cout<<"0";
			}
		}
		cout<<str;
		char ch[15];
		itoa(Edge[i].y, ch, 10);
		len = strlen(ch);
		if(len < 6){
			for(int j=0;j<6-len;j++){
				cout<<"0";
			}
		}
		cout<<ch<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:17: error: 'itoa' was not declared in this scope
   42 |                 itoa(Edge[i].x, str, 10);
      |                 ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>

using namespace std;

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

	vector<pair<int, int>> memcity;
	vector<pair<int, vector<int>>> cities;

	for (int i = 0; i < m; i++) {
		int p, y;
		scanf_s("%d%d", &p, &y);
		pair<int, int> tmp(p, y);
		memcity.push_back(tmp);
		
		auto ret = find_if(cities.begin(), cities.end(), [p](pair<int, vector<int>> x) {return x.first == p; });
		if (ret == cities.end()) {//not found
			pair<int, vector<int>> tmp(p, vector<int>{y});
			cities.push_back(tmp);
		}
		else {//found
			ret->second.push_back(y);
		}
	}

	for (auto it = cities.begin(); it != cities.end(); ++it) {
		sort(it->second.begin(), it->second.end());
	}
	
	for (auto it = memcity.begin(); it != memcity.end(); ++it) {
		int p = it->first;
		int y = it->second;
				
		auto ret = find_if(cities.begin(), cities.end(), [p](pair<int, vector<int>> x) {return x.first == p; });
		auto ret2 = find(ret->second.begin(), ret->second.end(), y);
		int d = distance(ret->second.begin(), ret2) + 1;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         scanf_s("%d%d", &n, &m);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <time.h>

using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N, M;
	cin >> N >> M;

	vector<vector<int>> data;
	data.resize(M);
	vector<vector<int>> p;
	vector<int> g;
	g.resize(M + 1);
	for (int m = 0; m < M; ++m) {
		int k1, k2;
		data[m].resize(2);
		cin >> k1 >> k2;
		data[m][0] = k1;
		data[m][1] = k2;
		p[m].resize(2);
		p[m][0] = k1;
		p[m][1] = k2;
		g[m] = 1;
	}
	vector<string> s;
	s.resize(M);
	sort(p.begin(), p.end());
	bool flags = false;
	for (int l = 0; l < M; ++l) {
		for (int k = 0; k < M;++k) {
			if ((float)(data[l][1] / p[k][1]) == 0) {
				char c[255];
				sprintf_s(c, "%06d%06d\n", data[l][0], g[data[l][0]]);
				s[k] += c;
				++g[data[l][0]];
				break;
			}
		}
	}
	for (int m = 0; m < M; ++m) {
		cout << s[m].c_str();
	}
//	system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:33: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
   38 |                                 sprintf_s(c, "%06d%06d\n", data[l][0], g[data[l][0]]);
      |                                 ^~~~~~~~~
      |                                 sprintf
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <time.h>

using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N, M;
	cin >> N >> M;

	vector<vector<int>> data;
	data.resize(M);
	vector<int> p;
	p.resize(M);
	vector<int> g;
	g.resize(M + 1);
	for (int m = 0; m < M; ++m) {
		int k1, k2;
		data[m].resize(2);
		cin >> k1 >> k2;
		data[m][0] = k1;
		data[m][1] = k2;
		p[m] = k2;
		g[m] = 1;
	}
	vector<string> s;
	s.resize(M);
	sort(p.begin(), p.end());
	bool flags = false;
	for (int l = 0; l < M; ++l) {
		for (int k = 0; k < M;++k) {
			if (data[l][1] == p[k]) {
				char c[255];
				sprintf_s(c, "%06d%06d\n", data[l][0], g[data[l][0]]);
				s[k] += c;
				++g[data[l][0]];
				break;
			}
		}
	}
	for (int m = 0; m < M; ++m) {
		cout << s[m].c_str();
	}
//	system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:33: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
   37 |                                 sprintf_s(c, "%06d%06d\n", data[l][0], g[data[l][0]]);
      |                                 ^~~~~~~~~
      |                                 sprintf
Language: C++

#include<bits/stdc++.h>

using namespace std;

typedef long long int llint;
typedef pair<int, int> pii;
typedef pair<llint, llint> pll;
typedef vector<int> vi;
typedef vector<llint> vl;
typedef vector<pii> vii;
typedef vector<pll> vll;

#define ci cin
#define co cout
#define en endl
#define ln cout<< '\n'
#define outl(x) cout<< (x) << '\n'
#define pb(a) push_back(a)
#define fi first
#define se second
#define MOD 1000000007

template<typename Tn> Tn gcd(Tn a, Tn b)
{
  return (b ? gcd(b, a % b) : a);
}

template<typename Tn> Tn lcm(Tn a, Tn b)
{
  return a / gcd(a, b) * b;
}

llint cnt = 0;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};

int n, m;
int y[100001], p[100001];

vi v[100001];
map<int, int> mp;

int main()
{
  ci>> n >> m;
  for(int i = 0; i < m; i++) {
    ci>> p[i] >> y[i];
    v[p[i]].pb(y[i]);
  }

  bool endSort[100001] = {};
  
  for(int i = 0; i < m; i++) {
    if(!endSort[p[i]]) sort(v[p[i]].begin(), v[p[i]].end());
    v[p[i]] = true;

    printf("%06d%06d\n", p[i], 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:55:15: error: no match for 'operator=' (operand types are 'vi' {aka 'std::vector<int>'} and 'bool')
   55 |     v[p[i]] = true;
      |               ^~~~
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 'bool' 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 'bool' 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 'bool' to 'std::initializer_list<int>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Language: C++

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

int main(){
    int m,n;
    cin>>n>>m;
    vector<vector<pair<int,int>>> v(n);
    for(int i=0;i<m;i++){
        cin>>p>>y;p--;y--;
        v[p].push_back(make_pair(y,i));
    }
    vector<pair<int,int>> ans(n);
    for(int i=0;i<n;i++){
        sort(v[i].begin(),v[i].end());
        for(int j=0;j<v[i].size();j++){
            ans[v[i][j].second]=make_pair(i,v[i][j].first);
        }
    }
    for(int i=0;i<n;i++){
        printf("%06d%06d/n",ans[i].first,ans[i].second);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'p' was not declared in this scope
    9 |         cin>>p>>y;p--;y--;
      |              ^
a.cc:9:17: error: 'y' was not declared in this scope
    9 |         cin>>p>>y;p--;y--;
      |                 ^