Language: C++

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

// Nが小さいので、O(N^2)の全探索も可能
// ただ、1つの青点に対して複数の赤点の候補がある場合、どれが最適かはわからない
// a_1,...,a_N,c_1,...c_Nはすべて異なり、b_1,...b_N,d_1,...d_Nはすべて異なるという制約から、
// ペアになることができる赤点が少ない青点からペアを決めていけば最適になりそう(直観)

const int MAX_N = 110;
bool visited[MAX_N];
int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
int N;
pair<int,int> candidate_num[MAX_N]; // first -- num, second -- index
vector<int> candidate[MAX_N];

int main()
{
    scanf("%d", &N);
    for(int i = 0; i < N; ++i) scanf("%d %d", &a[i], &b[i]);
    for(int i = 0; i < N; ++i) scanf("%d %d", &c[i], &d[i]);

    for(int i = 0; i < N; ++i) {
        candidate_num[i].second = i;
        for(int j = 0; j < N; ++j) {
            if(a[j] < c[i] && b[j] < d[i]) {
                ++candidate_num[i].first;
                candidate[i].push_back(j);
            }
        }
    }
    sort(candidate_num, candidate_num + N);
    int res = 0;
    for(const auto &p : candidate_num) {
        for(const auto &q : candidate[p.second]) {
            if(!visited[q]) {
                visited[q] = true; ++res;
                break;
            }
        }
    }
    printf("%d\n", res);
    return 0;
}#include<bits/stdc++.h>
using namespace std;
using ll = long long;

// Nが小さいので、O(N^2)の全探索も可能
// ただ、1つの青点に対して複数の赤点の候補がある場合、どれが最適かはわからない
// a_1,...,a_N,c_1,...c_Nはすべて異なり、b_1,...b_N,d_1,...d_Nはすべて異なるという制約から、
// ペアになることができる赤点が少ない青点からペアを決めていけば最適になりそう(直観)

const int MAX_N = 110;
bool visited[MAX_N];
int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
int N;
pair<int,int> candidate_num[MAX_N]; // first -- num, second -- index
vector<int> candidate[MAX_N];

int main()
{
    scanf("%d", &N);
    for(int i = 0; i < N; ++i) scanf("%d %d", &a[i], &b[i]);
    for(int i = 0; i < N; ++i) scanf("%d %d", &c[i], &d[i]);

    for(int i = 0; i < N; ++i) {
        candidate_num[i].second = i;
        for(int j = 0; j < N; ++j) {
            if(a[j] < c[i] && b[j] < d[i]) {
                ++candidate_num[i].first;
                candidate[i].push_back(j);
            }
        }
    }
    sort(candidate_num, candidate_num + N);
    int res = 0;
    for(const auto &p : candidate_num) {
        for(const auto &q : candidate[p.second]) {
            if(!visited[q]) {
                visited[q] = true; ++res;
                break;
            }
        }
    }
    printf("%d\n", res);
    return 0;
}

Compiler output:
a.cc:44:2: error: stray '#' in program
   44 | }#include<bits/stdc++.h>
      |  ^
a.cc:44:3: error: 'include' does not name a type
   44 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:53:11: error: redefinition of 'const int MAX_N'
   53 | const int MAX_N = 110;
      |           ^~~~~
a.cc:10:11: note: 'const int MAX_N' previously defined here
   10 | const int MAX_N = 110;
      |           ^~~~~
a.cc:54:6: error: redefinition of 'bool visited [110]'
   54 | bool visited[MAX_N];
      |      ^~~~~~~
a.cc:11:6: note: 'bool visited [110]' previously declared here
   11 | bool visited[MAX_N];
      |      ^~~~~~~
a.cc:55:5: error: redefinition of 'int a [110]'
   55 | int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
      |     ^
a.cc:12:5: note: 'int a [110]' previously declared here
   12 | int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
      |     ^
a.cc:55:15: error: redefinition of 'int b [110]'
   55 | int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
      |               ^
a.cc:12:15: note: 'int b [110]' previously declared here
   12 | int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
      |               ^
a.cc:55:25: error: redefinition of 'int c [110]'
   55 | int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
      |                         ^
a.cc:12:25: note: 'int c [110]' previously declared here
   12 | int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
      |                         ^
a.cc:55:35: error: redefinition of 'int d [110]'
   55 | int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
      |                                   ^
a.cc:12:35: note: 'int d [110]' previously declared here
   12 | int a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N];
      |                                   ^
a.cc:56:5: error: redefinition of 'int N'
   56 | int N;
      |     ^
a.cc:13:5: note: 'int N' previously declared here
   13 | int N;
      |     ^
a.cc:57:15: error: redefinition of 'std::pair<int, int> candidate_num [110]'
   57 | pair<int,int> candidate_num[MAX_N]; // first -- num, second -- index
      |               ^~~~~~~~~~~~~
a.cc:14:15: note: 'std::pair<int, int> candidate_num [110]' previously defined here
   14 | pair<int,int> candidate_num[MAX_N]; // first -- num, second -- index
      |               ^~~~~~~~~~~~~
a.cc:58:13: error: redefinition of 'std::vector<int> candidate [110]'
   58 | vector<int> candidate[MAX_N];
      |             ^~~~~~~~~
a.cc:15:13: note: 'std::vector<int> candidate [110]' previously declared here
   15 | vector<int> candidate[MAX_N];
      |             ^~~~~~~~~
a.cc:60:5: error: redefinition of 'int main()'
   60 | int main()
      |     ^~~~
a.cc:17:5: note: 'int main()' previously defined here
   17 | int main()
      |     ^~~~