Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i,n) for(ll i=0;i<n;i++)
#define ALL(a)  (a).begin(),(a).end()
ll n,m;
ll p[100000],y[100000];

int main(){
  cin>>n>>m;
  vector<ll> yd(n);
  rep(i,m){
    cin>>p[i]>>y[i];
    yd[p[i]].push_back(y[i]);
  }
  rep(i,n){
    sort(ALL(yd[i+1]));
  }
  rep(i,m){
    printf("%012lld\n",ll(p[i])*1000000+(ll)(lower_bound(ALL(yd[p[i]]),y[i])-yd[p[i]].begin())+1);
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: request for member 'push_back' in 'yd.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)p[i]))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
   14 |     yd[p[i]].push_back(y[i]);
      |              ^~~~~~~~~
a.cc:5:21: error: request for member 'begin' in 'yd.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)(i + 1)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
    5 | #define ALL(a)  (a).begin(),(a).end()
      |                     ^~~~~
a.cc:17:10: note: in expansion of macro 'ALL'
   17 |     sort(ALL(yd[i+1]));
      |          ^~~
a.cc:5:33: error: request for member 'end' in 'yd.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)(i + 1)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
    5 | #define ALL(a)  (a).begin(),(a).end()
      |                                 ^~~
a.cc:17:10: note: in expansion of macro 'ALL'
   17 |     sort(ALL(yd[i+1]));
      |          ^~~
a.cc:5:21: error: request for member 'begin' in 'yd.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)p[i]))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
    5 | #define ALL(a)  (a).begin(),(a).end()
      |                     ^~~~~
a.cc:20:58: note: in expansion of macro 'ALL'
   20 |     printf("%012lld\n",ll(p[i])*1000000+(ll)(lower_bound(ALL(yd[p[i]]),y[i])-yd[p[i]].begin())+1);
      |                                                          ^~~
a.cc:5:33: error: request for member 'end' in 'yd.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)p[i]))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
    5 | #define ALL(a)  (a).begin(),(a).end()
      |                                 ^~~
a.cc:20:58: note: in expansion of macro 'ALL'
   20 |     printf("%012lld\n",ll(p[i])*1000000+(ll)(lower_bound(ALL(yd[p[i]]),y[i])-yd[p[i]].begin())+1);
      |                                                          ^~~
a.cc:20:87: error: request for member 'begin' in 'yd.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)p[i]))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
   20 |     printf("%012lld\n",ll(p[i])*1000000+(ll)(lower_bound(ALL(yd[p[i]]),y[i])-yd[p[i]].begin())+1);
      |                                                                                       ^~~~~