Language: C++

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

int main(){
    int n;
    cin >> n;
    vector<int,2> red(2*n),blue(2*n);
    for(int i=0;i<n;i++)cin >> red[i][0] >> red[i][1];
    for(int i=0;i<n;i++)cin >> blue[i][0] >> blue[i][1];
    sort(red.begin(),red.end());
    sort(blue.begin(),red.end());

    int ans;
    int red_max_y=0;
    int i,j;
    for(i=0;i<n;i++)
    {
        for(j=0;j<n;j++)
        {
            if(red[j][0]<blue[i][0]&&red[j][1]<blue[i][1])
            {
                if(red_max_y<red[j][1])ans=j;
                red_max_y=max(red_max_y,red[j][1]);
            }
        }
        blue[ans][1]=-1;
    }

    ans=0
    for(i=0;i<n;i++)
    {
        if(blue[i]==-1)
        {
        ans++;
        }
    }

    cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: type/value mismatch at argument 2 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
    7 |     vector<int,2> red(2*n),blue(2*n);
      |                 ^
a.cc:7:17: note:   expected a type, got '2'
a.cc:8:35: error: invalid types 'int[int]' for array subscript
    8 |     for(int i=0;i<n;i++)cin >> red[i][0] >> red[i][1];
      |                                   ^
a.cc:8:48: error: invalid types 'int[int]' for array subscript
    8 |     for(int i=0;i<n;i++)cin >> red[i][0] >> red[i][1];
      |                                                ^
a.cc:9:36: error: invalid types 'int[int]' for array subscript
    9 |     for(int i=0;i<n;i++)cin >> blue[i][0] >> blue[i][1];
      |                                    ^
a.cc:9:50: error: invalid types 'int[int]' for array subscript
    9 |     for(int i=0;i<n;i++)cin >> blue[i][0] >> blue[i][1];
      |                                                  ^
a.cc:10:14: error: request for member 'begin' in 'red', which is of non-class type 'int'
   10 |     sort(red.begin(),red.end());
      |              ^~~~~
a.cc:10:26: error: request for member 'end' in 'red', which is of non-class type 'int'
   10 |     sort(red.begin(),red.end());
      |                          ^~~
a.cc:11:15: error: request for member 'begin' in 'blue', which is of non-class type 'int'
   11 |     sort(blue.begin(),red.end());
      |               ^~~~~
a.cc:11:27: error: request for member 'end' in 'red', which is of non-class type 'int'
   11 |     sort(blue.begin(),red.end());
      |                           ^~~
a.cc:20:19: error: invalid types 'int[int]' for array subscript
   20 |             if(red[j][0]<blue[i][0]&&red[j][1]<blue[i][1])
      |                   ^
a.cc:20:30: error: invalid types 'int[int]' for array subscript
   20 |             if(red[j][0]<blue[i][0]&&red[j][1]<blue[i][1])
      |                              ^
a.cc:20:41: error: invalid types 'int[int]' for array subscript
   20 |             if(red[j][0]<blue[i][0]&&red[j][1]<blue[i][1])
      |                                         ^
a.cc:20:52: error: invalid types 'int[int]' for array subscript
   20 |             if(red[j][0]<blue[i][0]&&red[j][1]<blue[i][1])
      |                                                    ^
a.cc:22:33: error: invalid types 'int[int]' for array subscript
   22 |                 if(red_max_y<red[j][1])ans=j;
      |                                 ^
a.cc:23:44: error: invalid types 'int[int]' for array subscript
   23 |                 red_max_y=max(red_max_y,red[j][1]);
      |                                            ^
a.cc:26:13: error: invalid types 'int[int]' for array subscript
   26 |         blue[ans][1]=-1;
      |             ^
a.cc:29:10: error: expected ';' before 'for'
   29 |     ans=0
      |          ^
      |          ;
   30 |     for(i=0;i<n;i++)
      |     ~~~   
a.cc:30:20: error: expected ';' before ')' token
   30 |     for(i=0;i<n;i++)
      |                    ^
      |                    ;