Language: C++

#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
struct node{
    ll color,d;
}apple[3*N];

bool cmp(node a,node b){
    return a.d>b.d;
}
int main(){
    int x,y,a,b,c;
    cin>>x>>y>>a>>b>>c;
    for(int i=0;i<a;i++){
        cin>>apple[i].d;
        apple[i].color=0;
    }
    for(int i=a;i<a+b;i++){
        cin>>apple[i].d;
        apple[i].color=1;
    }
    for(int i=a+b;i<a+b+c;i++){
        cin>>apple[i].d;
        apple[i].color=2;
    }
    sort(apple,apple+a+b+c,cmp);
    int p=0;
    ll sum=0;
    while(1){
        if(x==0 && y==0) {cout<<sum<<endl;break;}
        if(apple[p].color==0 && x>0){
            sum+=apple[p].d;
            x--;
        }
        else if(apple[p].color==1 && y>0){
            sum+=apple[p].d;
            y--;
        }
        else if(apple[p].color==2){
            if(x>0){
                sum+=apple[p].d;
                x--;
            }
            else if(y>0){
                sum+=apple[p].d;
                y--;
            }
        }
        p++;
        //cout<<x<<y<<sum<<endl;
    }
}


Compiler output:
a.cc:5:5: error: 'll' does not name a type
    5 |     ll color,d;
      |     ^~
a.cc: In function 'bool cmp(node, node)':
a.cc:9:14: error: 'struct node' has no member named 'd'
    9 |     return a.d>b.d;
      |              ^
a.cc:9:18: error: 'struct node' has no member named 'd'
    9 |     return a.d>b.d;
      |                  ^
a.cc: In function 'int main()':
a.cc:15:23: error: 'struct node' has no member named 'd'
   15 |         cin>>apple[i].d;
      |                       ^
a.cc:16:18: error: 'struct node' has no member named 'color'
   16 |         apple[i].color=0;
      |                  ^~~~~
a.cc:19:23: error: 'struct node' has no member named 'd'
   19 |         cin>>apple[i].d;
      |                       ^
a.cc:20:18: error: 'struct node' has no member named 'color'
   20 |         apple[i].color=1;
      |                  ^~~~~
a.cc:23:23: error: 'struct node' has no member named 'd'
   23 |         cin>>apple[i].d;
      |                       ^
a.cc:24:18: error: 'struct node' has no member named 'color'
   24 |         apple[i].color=2;
      |                  ^~~~~
a.cc:28:5: error: 'll' was not declared in this scope
   28 |     ll sum=0;
      |     ^~
a.cc:30:33: error: 'sum' was not declared in this scope
   30 |         if(x==0 && y==0) {cout<<sum<<endl;break;}
      |                                 ^~~
a.cc:31:21: error: 'struct node' has no member named 'color'
   31 |         if(apple[p].color==0 && x>0){
      |                     ^~~~~
a.cc:32:13: error: 'sum' was not declared in this scope
   32 |             sum+=apple[p].d;
      |             ^~~
a.cc:32:27: error: 'struct node' has no member named 'd'
   32 |             sum+=apple[p].d;
      |                           ^
a.cc:35:26: error: 'struct node' has no member named 'color'
   35 |         else if(apple[p].color==1 && y>0){
      |                          ^~~~~
a.cc:36:13: error: 'sum' was not declared in this scope
   36 |             sum+=apple[p].d;
      |             ^~~
a.cc:36:27: error: 'struct node' has no member named 'd'
   36 |             sum+=apple[p].d;
      |                           ^
a.cc:39:26: error: 'struct node' has no member named 'color'
   39 |         else if(apple[p].color==2){
      |                          ^~~~~
a.cc:41:17: error: 'sum' was not declared in this scope
   41 |                 sum+=apple[p].d;
      |                 ^~~
a.cc:41:31: error: 'struct node' has no member named 'd'
   41 |                 sum+=apple[p].d;
      |                               ^
a.cc:45:17: error: 'sum' was not declared in this scope
   45 |                 sum+=apple[p].d;
      |                 ^~~
a.cc:45:31: error: 'struct node' has no member named 'd'
   45 |                 sum+=apple[p].d;
      |                               ^