Language: C++

#include <iostream>
#include <vector>


typedef long long int ll;

int main()
{
  ll x, y, a, b, c;
  cin >> x >> y >> a >> b >> c;
  vector<ll> va(a); for(int i = 0; i < a; ++i) cin >> va[i];
  vector<ll> vb(b);  for(int i = 0; i < b; ++i) cin >> vb[i];
  vector<ll> vc(c);  for(int i = 0; i < c; ++i) cin >> vc[i];
  sort(va.begin(), va.end());
  sort(vb.begin(), vb.end());
  sort(vc.begin(), vc.end());
  
  vector<int> v;
  for(int i = max(0, a - x) ; i < a; ++i) vc.push_back(va[i]);
  for(int i = max(0, b - y) ; i < b; ++i) vc.push_back(vb[i]);
  sort(vc.begin(), vc.end());
  ll total = 0;
  for(int i = x + y - 1; i < (int) vc.size(); ++i) total += vc[i];
  cout << total;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |   cin >> x >> y >> a >> b >> c;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:3: error: 'vector' was not declared in this scope
   11 |   vector<ll> va(a); for(int i = 0; i < a; ++i) cin >> va[i];
      |   ^~~~~~
a.cc:11:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:11:12: error: expected primary-expression before '>' token
   11 |   vector<ll> va(a); for(int i = 0; i < a; ++i) cin >> va[i];
      |            ^
a.cc:11:14: error: 'va' was not declared in this scope; did you mean 'a'?
   11 |   vector<ll> va(a); for(int i = 0; i < a; ++i) cin >> va[i];
      |              ^~
      |              a
a.cc:12:12: error: expected primary-expression before '>' token
   12 |   vector<ll> vb(b);  for(int i = 0; i < b; ++i) cin >> vb[i];
      |            ^
a.cc:12:14: error: 'vb' was not declared in this scope; did you mean 'b'?
   12 |   vector<ll> vb(b);  for(int i = 0; i < b; ++i) cin >> vb[i];
      |              ^~
      |              b
a.cc:13:12: error: expected primary-expression before '>' token
   13 |   vector<ll> vc(c);  for(int i = 0; i < c; ++i) cin >> vc[i];
      |            ^
a.cc:13:14: error: 'vc' was not declared in this scope; did you mean 'c'?
   13 |   vector<ll> vc(c);  for(int i = 0; i < c; ++i) cin >> vc[i];
      |              ^~
      |              c
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |   sort(va.begin(), va.end());
      |   ^~~~
      |   short
a.cc:18:10: error: expected primary-expression before 'int'
   18 |   vector<int> v;
      |          ^~~
a.cc:19:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
   19 |   for(int i = max(0, a - x) ; i < a; ++i) vc.push_back(va[i]);
      |               ^~~
      |               std::max
In file included from /usr/include/c++/14/string:51,
                 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:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:20:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
   20 |   for(int i = max(0, b - y) ; i < b; ++i) vc.push_back(vb[i]);
      |               ^~~
      |               std::max
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:24:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |   cout << total;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~