Language: C++

#include<vector>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<utility>
#include<cstring>
using namespace std;
int n,x,y,ans;
int cnt[10020];
vector<pair<pair<int,int>,int>> a;
int main()
{
    cin>>n;
    //make_pair  生成pair，融合为一个单元;
    for(int i=0;i<n;i++)
    {
        cin>>x>>y;
        int wxy=make_pair(make_pair(x,y),0);
        a.push_back(wxy);
    }
    for(int i=0;i<n;i++)
    {
        cin>>x>>y;
        int wxy=make_pair(make_pair(x,y),1);
        a.push_back(wxy);
    }
    sort(a.begin(),a.end());
    memset(cnt,0,sizeof(cnt));
    for(int i=0;i<a.size();i++)
    {
        if(!a[i].second)
            cnt[a[i].first.second]++;
        else
        {
            for(int j=a[i].first.second-1;j>=0;j--){
                if(cnt[j]>0)
                {
                    cnt[j]--;
                    ans++;
                    break;
                }
            }
        }
    }
    cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: cannot convert 'std::pair<std::pair<int, int>, int>' to 'int' in initialization
   18 |         int wxy=make_pair(make_pair(x,y),0);
      |                 ~~~~~~~~~^~~~~~~~~~~~~~~~~~
      |                          |
      |                          std::pair<std::pair<int, int>, int>
a.cc:19:20: error: no matching function for call to 'std::vector<std::pair<std::pair<int, int>, int> >::push_back(int&)'
   19 |         a.push_back(wxy);
      |         ~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; value_type = std::pair<std::pair<int, int>, int>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'int' to 'const std::vector<std::pair<std::pair<int, int>, int> >::value_type&' {aka 'const std::pair<std::pair<int, int>, int>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; value_type = std::pair<std::pair<int, int>, int>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::pair<std::pair<int, int>, int> >::value_type&&' {aka 'std::pair<std::pair<int, int>, int>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
a.cc:24:26: error: cannot convert 'std::pair<std::pair<int, int>, int>' to 'int' in initialization
   24 |         int wxy=make_pair(make_pair(x,y),1);
      |                 ~~~~~~~~~^~~~~~~~~~~~~~~~~~
      |                          |
      |                          std::pair<std::pair<int, int>, int>
a.cc:25:20: error: no matching function for call to 'std::vector<std::pair<std::pair<int, int>, int> >::push_back(int&)'
   25 |         a.push_back(wxy);
      |         ~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; value_type = std::pair<std::pair<int, int>, int>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'int' to 'const std::vector<std::pair<std::pair<int, int>, int> >::value_type&' {aka 'const std::pair<std::pair<int, int>, int>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; value_type = std::pair<std::pair<int, int>, int>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::pair<std::pair<int, int>, int> >::value_type&&' {aka 'std::pair<std::pair<int, int>, int>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~