Language: C++

#include<bits/stdc++.h>
#define rep(i,N) for(int i=0;i<(N);i++)
#define rrep(i, n) for (int i = (int)n-1; i >= 0; --i)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e12;
const int inf = 1e9;
const int mod = 1e9+7;
typedef long long ll;
typedef pair<ll,int> P;
typedef set<int> S;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

__attribute__ ((constructor))
void init() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(10);
}

signed main(){
    ll x, y, a, b, c;
    cin >> x >> y >> a >> b >> c;
    vector<ll> p(a, 0), q(b, 0), r(c, 0);
    rep(i, a) cin >> p[i];
    rep(i, b) cin >> q[i];
    rep(i, c) cin >> r[i];
    vector<ll> all;
    sort(p.rbegin(), p.rend());
    sort(q.rbegin(), q.rend());
    rep(i, min(x, a)) all.push_back(p[i]);
    rep(i, min(y, b)) all.push_back(q[i]);
    rep(i, c) all.push_back(r[i]);
    sort(all.rbegin(), all.rend());
    ll ans = 0;
    rep(i,min(x+y,int(all.size()))) ans += all[i];
    cout << ans << "\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:14: error: no matching function for call to 'min(ll, int)'
   39 |     rep(i,min(x+y,int(all.size()))) ans += all[i];
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:2:33: note: in definition of macro 'rep'
    2 | #define rep(i,N) for(int i=0;i<(N);i++)
      |                                 ^
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:39:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   39 |     rep(i,min(x+y,int(all.size()))) ans += all[i];
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:2:33: note: in definition of macro 'rep'
    2 | #define rep(i,N) for(int i=0;i<(N);i++)
      |                                 ^
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:39:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   39 |     rep(i,min(x+y,int(all.size()))) ans += all[i];
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:2:33: note: in definition of macro 'rep'
    2 | #define rep(i,N) for(int i=0;i<(N);i++)
      |                                 ^