Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0;i < n;i++)
#define rev(i, n) for(int i = n;i >= 0;i--)
#define Rep(i, m, n) for(int i = m;i < n;i++)
#define repeatrev(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
#define itn int

using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;
typedef priority_queue<int> Pr;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll int X, Y, Z, K;
    cin >> X >> Y >> Z >> K;
    ll int A[X], B[Y], C[Z];
    rep(i, X) cin >> A[i];
    rep(i, Y) cin >> B[i];
    rep(i, Z) cin >> C[i];
    sort(A, A + X);
    sort(B, B + Y);
    sort(C, C + Z);
    reverse(A, A + X);
    reverse(B, B + Y);
    reverse(C, C + Z);
    //ll int t[1000500];
    priority_queue<ll int> Q;
    priority_queue<ll int> Q_1;
    //memset(t, 0, sizeof(t));
    int g = 0;
    rep(i, X){
        rep(j, Y){
            Q.push(A[i] + B[j]);
            // t[g] = A[i] + B[j];
           // g ++;
        }
    }
    //sort(t, t + 1000500);
    //reverse(t, t + 1000500);
    //ll int ee[3000100];
    //memset(ee, 0, sizeof(ee));
    ll int gb = 0;
    ll int ii = 0;
    ll int jj = 0;
    ll int yy = 0;
    rep(i, min(Q.size(), 3000)){
        ll int ff = Q.top();
        Q.pop();
        rep(j, Z){
            Q_1.push(ff + C[j]);
            //yy++;
        }
    }
    //sort(ee, ee + 3000100);
    rep(i, K){
        ll int jjj = Q_1.top();
        Q_1.pop();
        cout << jjj << endl;
    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:15: error: no matching function for call to 'min(std::priority_queue<long long int>::size_type, int)'
   58 |     rep(i, min(Q.size(), 3000)){
      |            ~~~^~~~~~~~~~~~~~~~
a.cc:2:37: 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:58:15: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'int')
   58 |     rep(i, min(Q.size(), 3000)){
      |            ~~~^~~~~~~~~~~~~~~~
a.cc:2:37: 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:58:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
   58 |     rep(i, min(Q.size(), 3000)){
      |            ~~~^~~~~~~~~~~~~~~~
a.cc:2:37: note: in definition of macro 'rep'
    2 | #define rep(i, n) for(int i = 0;i < n;i++)
      |                                     ^