Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <queue>

#define rep(i, n) for(int i = 0; i < (int)(n); i++)

using namespace std;

struct Point {
    int x;
    int y;
    Point(){}
    Point(int x, int y){
        this->x = x;
        this->y = y;
    }
};

struct BluePoint : Point{
    BluePoint(int x, int y) : Point(x,y){}
};
struct RedPoint : Point{
    RedPoint(int x, int y) : Point(x,y){}
};

bool operator>(const BluePoint& p1, const BluePoint& p2){
    return p1.x > p2.x;
}
bool operator>(const RedPoint& p1, const RedPoint& p2){
    return p1.y > p2.y;
}

int main(){
    int n; cin >> n;
    vector<RedPoint> r(n);
    vector<BluePoint> b(n);
    int x,y;
    rep(i, n) {
        cin >> x >> y;
        r[i] = RedPoint(x,y);
    }
    rep(i, n) {
        cin >> x >> y;
        b[i] = BluePoint(x,y);
    }
    int ans = 0;
    cout << ans << endl;
}




Compiler output:
In file included from /usr/include/c++/14/bits/alloc_traits.h:33,
                 from /usr/include/c++/14/ext/alloc_traits.h:34,
                 from /usr/include/c++/14/bits/basic_string.h:39,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_construct.h: In instantiation of 'void std::_Construct(_Tp*, _Args&& ...) [with _Tp = RedPoint; _Args = {}]':
/usr/include/c++/14/bits/stl_uninitialized.h:643:18:   required from 'static _ForwardIterator std::__uninitialized_default_n_1<_TrivialValueType>::__uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = RedPoint*; _Size = long unsigned int; bool _TrivialValueType = false]'
  643 |                 std::_Construct(std::__addressof(*__cur));
      |                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_uninitialized.h:712:20:   required from '_ForwardIterator std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = RedPoint*; _Size = long unsigned int]'
  710 |       return __uninitialized_default_n_1<__is_trivial(_ValueType)
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  711 |                                          && __can_fill>::
      |                                          ~~~~~~~~~~~~~~~~
  712 |         __uninit_default_n(__first, __n);
      |         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_uninitialized.h:779:44:   required from '_ForwardIterator std::__uninitialized_default_n_a(_ForwardIterator, _Size, allocator<_Tp>&) [with _ForwardIterator = RedPoint*; _Size = long unsigned int; _Tp = RedPoint]'
  779 |     { return std::__uninitialized_default_n(__first, __n); }
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1720:36:   required from 'void std::vector<_Tp, _Alloc>::_M_default_initialize(size_type) [with _Tp = RedPoint; _Alloc = std::allocator<RedPoint>; size_type = long unsigned int]'
 1720 |           std::__uninitialized_default_n_a(this->_M_impl._M_start, __n,
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1721 |                                            _M_get_Tp_allocator());
      |                                            ~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:558:9:   required from 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = RedPoint; _Alloc = std::allocator<RedPoint>; size_type = long unsigned int; allocator_type = std::allocator<RedPoint>]'
  558 |       { _M_default_initialize(__n); }
      |         ^~~~~~~~~~~~~~~~~~~~~
a.cc:38:25:   required from here
   38 |     vector<RedPoint> r(n);
      |                         ^
/usr/include/c++/14/bits/stl_construct.h:119:7: error: no matching function for call to 'RedPoint::RedPoint()'
  119 |       ::new((void*)__p) _Tp(std::forward<_Args>(__args)...);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:26:5: note: candidate: 'RedPoint::RedPoint(int, int)'
   26 |     RedPoint(int x, int y) : Point(x,y){}
      |     ^~~~~~~~
a.cc:26:5: note:   candidate expects 2 arguments, 0 provided
a.cc:25:8: note: candidate: 'constexpr RedPoint::RedPoint(const RedPoint&)'
   25 | struct RedPoint : Point{
      |        ^~~~~~~~
a.cc:25:8: note:   candidate expects 1 argument, 0 provided
a.cc:25:8: note: candidate: 'constexpr RedPoint::RedPoint(RedPoint&&)'
a.cc:25:8: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_construct.h: In instantiation of 'void std::_Construct(_Tp*, _Args&& ...) [with _Tp = BluePoint; _Args = {}]':
/usr/include/c++/14/bits/stl_uninitialized.h:643:18:   required from 'static _ForwardIterator std::__uninitialized_default_n_1<_TrivialValueType>::__uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = BluePoint*; _Size = long unsigned int; bool _TrivialValueType = false]'
  643 |                 std::_Construct(std::__addressof(*__cur));
      |                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_uninitialized.h:712:20:   required from '_ForwardIterator std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = BluePoint*; _Size = long unsigned int]'
  710 |       return __uninitialized_default_n_1<__is_trivial(_ValueType)
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  711 |                                          && __can_fill>::
      |                                          ~~~~~~~~~~~~~~~~
  712 |         __uninit_default_n(__first, __n);
      |         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_uninitialized.h:779:44:   required from '_ForwardIterator std::__uninitialized_default_n_a(_ForwardIterator, _Size, allocator<_Tp>&) [with _ForwardIterator = BluePoint*; _Size = long unsigned int; _Tp = BluePoint]'
  779 |     { return std::__uninitialized_default_n(__first, __n); }
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1720:36:   required from 'void std::vector<_Tp, _Alloc>::_M_default_initialize(size_type) [with _Tp = BluePoint; _Alloc = std::allocator<BluePoint>; size_type = long unsigned int]'
 1720 |           std::__uninitialized_default_n_a(this->_M_impl._M_start, __n,
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1721 |                                            _M_get_Tp_allocator());
      |                                            ~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:558:9:   required from 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = BluePoint; _Alloc = std::allocator<BluePoint>; size_type = long unsigned int; allocator_type = std::allocator<BluePoint>]'
  558 |       { _M_default_initialize(__n); }
      |         ^~~~~~~~~~~~~~~~~~~~~
a.cc:39:26:   required from here
   39 |     vector<BluePoint> b(n);
      |                          ^
/usr/include/c++/14/bits/stl_construct.h:119:7: error: no matching function for call to 'BluePoint::BluePoint()'
  119 |       ::new((void*)__p) _Tp(std::forward<_Args>(__args)...);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:23:5: note: candidate: 'BluePoint::BluePoint(int, int)'
   23 |     BluePoint(int x, int y) : Point(x,y){}
      |     ^~~~~~~~~
a.cc:23:5: note:   candidate expects 2 arguments, 0 provided
a.cc:22:8: note: candidate: 'constexpr BluePoint::BluePoint(const BluePoint&)'
   22 | struct BluePoint : Point{
      |        ^~~~~~~~~
a.cc:22:8: note:   candidate expects 1 argument, 0 provided
a.cc:22:8: note: candidate: 'constexpr BluePoint::BluePoint(BluePoint&&)'
a.cc:22:8: note:   candidate expects 1 argument, 0 provided