Language: C++

#include<bits/stdc++.h>
int main()
{
   int x,y,a,b,c,sum=0
   cin>>x>>y>>a>>b>>c;
   int q[b],r[c],p[a];
   
   for(int i=0;i<a;i++)
     cin>> p[i];
   for(int i=0;i<b;i++)
     cin>>q[i];
  for(int i=0;i<c;i++)
     cin>>r[i];
  sort(p,p+a);
  sort(q,q+b);
  sort(r,r+c);
  int i=0,j=0;
  while(x>=0&&y>=0)
  {
    if(p[a-1]>=r[c-1]&&x>=0)
    {
      sum=sum+p[a-1];
      a--;
      x--;
    }
     else if(q[b-1]>=r[c-1]&&y>=0)
     { 
       sum=sum+q[b-1];
       b--;
       y--;
     }
    else if(p[a-1]<r[c-1])
    {
      sum=sum+r[c-1];
      c--;
      x--;
    } 
    else if(q[b-1]<r[c-1])
    {
      sum=sum+r[c];
      c--;
      y--;
      
    }
      
       
  }
  cout<<sum<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:4: error: expected ',' or ';' before 'cin'
    5 |    cin>>x>>y>>a>>b>>c;
      |    ^~~
a.cc:9:6: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |      cin>> p[i];
      |      ^~~
      |      std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:6: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |      cin>>q[i];
      |      ^~~
      |      std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:6: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   13 |      cin>>r[i];
      |      ^~~
      |      std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   14 |   sort(p,p+a);
      |   ^~~~
      |   std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:48:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   48 |   cout<<sum<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:48:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   48 |   cout<<sum<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~