Language: C++

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

int main(){

	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0) ;

    int x, y, z, k ;
    cin >> x >> y >> z >> k ;
    vector<ll> a(x), b(y), c(z) ;

    for (int i = 0; i < x; i++)
        cin >> a[i] ;
    for (int i = 0; i < y; i++)
        cin >> b[i] ;
    for (int i = 0; i < z; i++)
        cin >> c[i] ;

    vector<ll> ab ;

    for (int i = 0; i < x; i++) {

        for (int j = 0; j < y; j++) {

            ab.push_back(a[i] + b[j]) ;

        }

    }
    sort(c.rbegin(), c.rend()) ;
    sort(ab.rbegin(), ab.rend()) ;

    vector<ll> abc ;
    for (int i = 0; i < min(k, x*y); i++) {

        for (int j = 0; j < min(k, z); j++) {

            abc.push_back(ab[i] + c[j]) ;

        }

    }

    sort(abc.rbegin(), abc.rend()) ;
    for (int i = 0; i < k; i++) cout << abc[i] << endl ;
    return 0 ;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'll' was not declared in this scope
   12 |     vector<ll> a(x), b(y), c(z) ;
      |            ^~
a.cc:12:14: error: template argument 1 is invalid
   12 |     vector<ll> a(x), b(y), c(z) ;
      |              ^
a.cc:12:14: error: template argument 2 is invalid
a.cc:15:17: error: invalid types 'int[int]' for array subscript
   15 |         cin >> a[i] ;
      |                 ^
a.cc:17:17: error: invalid types 'int[int]' for array subscript
   17 |         cin >> b[i] ;
      |                 ^
a.cc:19:17: error: invalid types 'int[int]' for array subscript
   19 |         cin >> c[i] ;
      |                 ^
a.cc:21:14: error: template argument 2 is invalid
   21 |     vector<ll> ab ;
      |              ^
a.cc:27:16: error: request for member 'push_back' in 'ab', which is of non-class type 'int'
   27 |             ab.push_back(a[i] + b[j]) ;
      |                ^~~~~~~~~
a.cc:27:27: error: invalid types 'int[int]' for array subscript
   27 |             ab.push_back(a[i] + b[j]) ;
      |                           ^
a.cc:27:34: error: invalid types 'int[int]' for array subscript
   27 |             ab.push_back(a[i] + b[j]) ;
      |                                  ^
a.cc:32:12: error: request for member 'rbegin' in 'c', which is of non-class type 'int'
   32 |     sort(c.rbegin(), c.rend()) ;
      |            ^~~~~~
a.cc:32:24: error: request for member 'rend' in 'c', which is of non-class type 'int'
   32 |     sort(c.rbegin(), c.rend()) ;
      |                        ^~~~
a.cc:33:13: error: request for member 'rbegin' in 'ab', which is of non-class type 'int'
   33 |     sort(ab.rbegin(), ab.rend()) ;
      |             ^~~~~~
a.cc:33:26: error: request for member 'rend' in 'ab', which is of non-class type 'int'
   33 |     sort(ab.rbegin(), ab.rend()) ;
      |                          ^~~~
a.cc:35:14: error: template argument 2 is invalid
   35 |     vector<ll> abc ;
      |              ^
a.cc:40:17: error: request for member 'push_back' in 'abc', which is of non-class type 'int'
   40 |             abc.push_back(ab[i] + c[j]) ;
      |                 ^~~~~~~~~
a.cc:40:29: error: invalid types 'int[int]' for array subscript
   40 |             abc.push_back(ab[i] + c[j]) ;
      |                             ^
a.cc:40:36: error: invalid types 'int[int]' for array subscript
   40 |             abc.push_back(ab[i] + c[j]) ;
      |                                    ^
a.cc:46:14: error: request for member 'rbegin' in 'abc', which is of non-class type 'int'
   46 |     sort(abc.rbegin(), abc.rend()) ;
      |              ^~~~~~
a.cc:46:28: error: request for member 'rend' in 'abc', which is of non-class type 'int'
   46 |     sort(abc.rbegin(), abc.rend()) ;
      |                            ^~~~
a.cc:47:44: error: invalid types 'int[int]' for array subscript
   47 |     for (int i = 0; i < k; i++) cout << abc[i] << endl ;
      |                                            ^