Language: C++

#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0;i<n;i++)
#include <bits/stdc++.h>
#include <numeric>
using namespace std;
typedef long long ll;
const int mod= 1e+9+7;

int main() {
    ll X,Y,A,B,C;
    cin>>X>>Y>>A>>B>>C;
    vector<vector<ll>>a(A,vector<char>(2));
    rep(i,A){
        cin>>a[i][0];
        a[i][1]='A';
    }
    sort(a.begin(),a.end());
    reverse(a.begin(),a.end());
vector<vector<ll>>b(B,vector<char>(2));
    rep(i,B){
        cin>>b[i][0];
        b[i][1]='B';
    }
    sort(b.begin(),b.end());
    reverse(b.begin(),b.end());
    vector<vector<ll>>c(C,vector<char>(2));
    rep(i,C){
        cin>>c[i][0];
        c[i][1]='C';
    }
    sort(c.begin(),c.end());
    reverse(c.begin(),c.end());
    ll ans=0;
    vector<vector<ll>>s(X+Y+C,vector<char>(2));
    for(int i=0;i<X;i++){
        s[i][0]=a[i][0];
        s[i][0]=a[i][1];
        ans+=s[i][0];
    }
    for(int i=X;i<X+Y;i++){
        s[i][0]=b[i-X][0];
         s[i][1]=b[i-X][1];
        ans+=s[i][0];
    }
    for(int i=X+Y;i<X+Y+C;i++){
        s[i][0]=c[i-X-Y][0];
          s[i][1]=c[i-X-Y][1];
    }
    sort(s.begin(),s.end());
    reverse(s.begin(),s.end());
    ll x=X, y=Y;
    for(int i=0;i<X+Y;i++){
        if(x>0){
        if(s[i][1]=="A")x--;
        sum+=s[i][0];
        }
        if(y>0){
              if(s[i][1]=="B")y--;
              sum+=s[i][0];
        }
    }
    cout<<sum<<endl;

}
 



Compiler output:
a.cc: In function 'int main()':
a.cc:12:42: error: no matching function for call to 'std::__debug::vector<std::__debug::vector<long long int> >::vector(ll&, std::__debug::vector<char>)'
   12 |     vector<vector<ll>>a(A,vector<char>(2));
      |                                          ^
In file included from /usr/include/c++/14/vector:76,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:3:
/usr/include/c++/14/debug/vector:212:9: note: candidate: 'template<class _InputIterator, class> std::__debug::vector<_Tp, _Allocator>::vector(_InputIterator, _InputIterator, const _Allocator&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >]'
  212 |         vector(_InputIterator __first, _InputIterator __last,
      |         ^~~~~~
/usr/include/c++/14/debug/vector:212:9: note:   template argument deduction/substitution failed:
a.cc:12:42: note:   deduced conflicting types for parameter '_InputIterator' ('long long int' and 'std::__debug::vector<char>')
   12 |     vector<vector<ll>>a(A,vector<char>(2));
      |                                          ^
/usr/include/c++/14/debug/vector:250:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(_Base_ref) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >]'
  250 |       vector(_Base_ref __x)
      |       ^~~~~~
/usr/include/c++/14/debug/vector:250:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/debug/vector:241:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >; allocator_type = std::allocator<std::__debug::vector<long long int> >]'
  241 |       vector(initializer_list<value_type> __l,
      |       ^~~~~~
/usr/include/c++/14/debug/vector:241:43: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::initializer_list<std::__debug::vector<long long int> >'
  241 |       vector(initializer_list<value_type> __l,
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/debug/vector:232:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(std::__debug::vector<_Tp, _Allocator>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >; std::__type_identity_t<_Alloc> = std::allocator<std::__debug::vector<long long int> >]'
  232 |       vector(vector&& __x, const __type_identity_t<allocator_type>& __a)
      |       ^~~~~~
/usr/include/c++/14/debug/vector:232:23: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::__debug::vector<std::__debug::vector<long long int> >&&'
  232 |       vector(vector&& __x, const __type_identity_t<allocator_type>& __a)
      |              ~~~~~~~~~^~~
/usr/include/c++/14/debug/vector:228:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(const std::__debug::vector<_Tp, _Allocator>&, std::__type_identity_t<_Alloc>&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >; std::__type_identity_t<_Alloc> = std::allocator<std::__debug::vector<long long int> >]'
  228 |       vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
      |       ^~~~~~
/usr/include/c++/14/debug/vector:228:28: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'const std::__debug::vector<std::__debug::vector<long long int> >&'
  228 |       vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
      |              ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/debug/vector:225:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(std::__debug::vector<_Tp, _Allocator>&&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >]'
  225 |       vector(vector&&) = default;
      |       ^~~~~~
/usr/include/c++/14/debug/vector:225:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/debug/vector:224:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(const std::__debug::vector<_Tp, _Allocator>&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >]'
  224 |       vector(const vector&) = default;
      |       ^~~~~~
/usr/include/c++/14/debug/vector:224:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/debug/vector:195:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(size_type, std::__type_identity_t<_Alloc>&, const _Allocator&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >; size_type = long unsigned int; std::__type_identity_t<_Alloc> = std::__debug::vector<long long int>]'
  195 |       vector(size_type __n, const __type_identity_t<_Tp>& __value,
      |       ^~~~~~
/usr/include/c++/14/debug/vector:195:59: note:   no known conversion for argument 2 from 'std::__debug::vector<char>' to 'std::__type_identity_t<std::__debug::vector<long long int> >&' {aka 'const std::__debug::vector<long long int>&'}
  195 |       vector(size_type __n, const __type_identity_t<_Tp>& __value,
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/debug/vector:191:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(size_type, const _Allocator&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >; size_type = long unsigned int]'
  191 |       vector(size_type __n, const _Allocator& __a = _Allocator())
      |       ^~~~~~
/usr/include/c++/14/debug/vector:191:47: note:   no known conversion for argument 2 from 'std::__debug::vector<char>' to 'const std::allocator<std::__debug::vector<long long int> >&'
  191 |       vector(size_type __n, const _Allocator& __a = _Allocator())
      |                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/debug/vector:185:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(const _Allocator&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >]'
  185 |       vector(const _Allocator& __a) _GLIBCXX_NOEXCEPT
      |       ^~~~~~
/usr/include/c++/14/debug/vector:185:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/debug/vector:180:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector() [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >]'
  180 |       vector() = default;
      |       ^~~~~~
/usr/include/c++/14/debug/vector:180:7: note:   candidate expects 0 arguments, 2 provided
a.cc:19:38: error: no matching function for call to 'std::__debug::vector<std::__debug::vector<long long int> >::vector(ll&, std::__debug::vector<char>)'
   19 | vector<vector<ll>>b(B,vector<char>(2));
      |                                      ^
/usr/include/c++/14/debug/vector:212:9: note: candidate: 'template<class _InputIterator, class> std::__debug::vector<_Tp, _Allocator>::vector(_InputIterator, _InputIterator, const _Allocator&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >]'
  212 |         vector(_InputIterator __first, _InputIterator __last,
      |         ^~~~~~
/usr/include/c++/14/debug/vector:212:9: note:   template argument deduction/substitution failed:
a.cc:19:38: note:   deduced conflicting types for parameter '_InputIterator' ('long long int' and 'std::__debug::vector<char>')
   19 | vector<vector<ll>>b(B,vector<char>(2));
      |                                      ^
/usr/include/c++/14/debug/vector:250:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(_Base_ref) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >]'
  250 |       vector(_Base_ref __x)
      |       ^~~~~~
/usr/include/c++/14/debug/vector:250:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/debug/vector:241:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >; allocator_type = std::allocator<std::__debug::vector<long long int> >]'
  241 |       vector(initializer_list<value_type> __l,
      |       ^~~~~~
/usr/include/c++/14/debug/vector:241:43: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::initializer_list<std::__debug::vector<long long int> >'
  241 |       vector(initializer_list<value_type> __l,
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/debug/vector:232:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(std::__debug::vector<_Tp, _Allocator>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::__debug::vector<long long int>; _Allocator = std::allocator<std::__debug::vector<long long int> >; std::__type_identity_t<_Alloc> = std::allocator<std::__debug::vector<long long int> >]'
  232 |       vector(vector&& __x, const __type_identity_t<allocator_type>& __a)
      |       ^~~~~~
/usr/include/c++/14/debug/vector:232:23: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::__debug::vector<std::__debug::vector<long long int> >&&'
  232 |       vector(vector&& __x, const __type_identity_t<allocator_type>& __a)
      |              ~~~~~~~~~^~~
/usr/include/c++/14/debug/vector:228:7: note: candidate: 'std::__debug::vector<_Tp, _Allocator>::vector(const std::__debug::vector<_Tp, _Allocator>&, std::__type_identity_t<_Alloc>&) [with _Tp = std::__debug::vect