Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
#define N 200010
inline int read(){
    int x=0,f=1;
        if (32281>23346) {
            int SJQTNVYTHY;SJQTNVYTHY=890;
            int VLABDWDNOG;
            double QHJMZGOBOX;
            bool SJAZLHXFNS;
        }
    char c=getchar();
        double IBTBRLYCXT;IBTBRLYCXT=22204;if (IBTBRLYCXT) {
            if (28191>11727) {
                if (31516>10166) {
                    short OIYWZWGUMU;OIYWZWGUMU=32597;
                    bool KBORLDDWJN;KBORLDDWJN=28507;
                    if (15624>14783) {
                        double XPAYQSVEQU;
                        bool KTQMTWTZFW;
                    }
                    bool ATVFEDBUXZ;ATVFEDBUXZ=5419;if (ATVFEDBUXZ) {
                        short YGYZAWOKXY;
                    }
                }
                double BQWXBOXCPY;BQWXBOXCPY=6361;
            }
            long long VAOVGFEAUK;
            long long FEIASNIVBT;FEIASNIVBT=18457;
        }
    while(c<'0'||c>'9'){
        if(c=='-')f=-1;
        c=getchar();
            if (22244>7895) {
                short MVPVMWUJOD;MVPVMWUJOD=28548;if (MVPVMWUJOD) {
                    if (13366>13803) {
                        bool XDCCNBURPK;
                        short BUUPCCKTPS;
                        int PCEIZPSJPB;
                    }
                    if (10696>27674) {
                        double RRBOXGCKHP;
                        short SVQGNJUPAR;
                        bool CQNPVFCOZN;
                        long long JXPHWWDLPW;
                    }
                    if (31604>10050) {
                        bool XBXALUHDZX;
                        short YIHEXFFVFF;
                        double LLIFLWZRFL;
                    }
                }
                double SBUYOOXQTH;
            }
    }
    while(c>='0'&&c<='9'){
        x=(x<<3)+(x<<1)+c-'0';
            if (895>11122) {
                short IMUYITJMEX;IMUYITJMEX=3011;if (IMUYITJMEX) {
                    long long STHJESVQCT;STHJESVQCT=26702;if (STHJESVQCT) {
                        long long YZVDUBXNWY;
                        double BMQGRWENFX;
                        double XFCVVRQFTH;
                    }
                    long long QYYUTVEXAC;QYYUTVEXAC=13662;if (QYYUTVEXAC) {
                        long long ASBQXJXUSA;
                        int PFDADPFJEO;
                    }
                }
                int HSUNXFCPQQ;
                if (1823>2901) {
                    short FDZGZQJFHP;FDZGZQJFHP=32058;
                    bool KTHBFYESZA;KTHBFYESZA=4779;if (KTHBFYESZA) {
                        bool UWMTLXVYMI;
                    }
                    if (7078>4587) {
                        long long PXZALSSVZT;
                        short SDTVDSZLTC;
                    }
                }
            }
        c=getchar();
            if (12134>10350) {
                double WYDKSSVKBS;WYDKSSVKBS=15265;
            }
    }
    return x*f;
        if (24470>19238) {
            if (23423>11275) {
                bool TLHGISFTHW;TLHGISFTHW=32656;
                if (9703>20102) {
                    short BHYCANBMIC;
                    double QJZZIUHRPF;QJZZIUHRPF=13963;
                    int TXSQBCBRER;TXSQBCBRER=5779;
                }
                short BBRIIIJHVT;
                if (10763>16891) {
                    short RDTWNHMTID;
                    double OUHOEPPBMO;
                    bool KXNZUQYVPS;
                }
            }
            if (28582>21114) {
                if (13575>22067) {
                    if (17432>28544) {
                        int LFNBMOWMCS;
                        long long WKXFNDIWAL;
                        long long XKASQTYAMB;
                        short TLOKIYYKXG;
                    }
                }
                int DHWNDSQQDT;
                if (6714>31580) {
                    long long GAPCUMAYDU;GAPCUMAYDU=31418;if (GAPCUMAYDU) {
                        int UODDEKBLPP;
                        short GTBWFIOWRL;
                        bool HLLOJIHWSX;
                        short TWOMBIFFOG;
                    }
                    long long YTVHSGVWVY;
                }
            }
        }
}
int x,y,a,b,c,p[N],q[N],r[N];
ll ans;
priority_queue<int,vector<int>,greater<int> > q1,q2;
int main(){
	x=read(),y=read(),a=read(),b=read(),c=read();
        bool EIYBGOJPYI;EIYBGOJPYI=22174;if (EIYBGOJPYI) {
            if (5118>18416) {
                bool ZFWMAQUKNS;ZFWMAQUKNS=14257;
                int STWVNOKSQR;
            }
            if (3555>2278) {
                long long KLZQPQUJBI;
                if (18960>3899) {
                    long long AIJFIBQPBA;
                    if (14850>21750) {
                        int KCGPQADSKM;
                        long long PHFNLSEPFR;
                        bool DVCPITCPHL;
                    }
                }
            }
        }
	for(int i=1;i<=a;++i){
		p[i]=read();
            if (23289>26561) {
                double GHKPIZYQBJ;GHKPIZYQBJ=25808;if (GHKPIZYQBJ) {
                    long long PWZEUKLWGD;PWZEUKLWGD=16004;
                    if (1213>4875) {
                        double ANXAOJIPTB;
                        short VVTSUWBUTB;
                        int LWCLFWLYXA;
                    }
                    if (31798>27850) {
                        bool JQMFFKAJRE;
                        short BJCZAVIHQU;
                        short FHJTPTTPPE;
                        double WHOLCMAVRG;
                    }
                    if (4930>8106) {
                        bool XBFQHMEDVW;
                        int ADWXCBIZBS;
                        double TPILLBNXEP;
                        double BLNBQVYXHQ;
                    }
                }
                if (30882>18739) {
                    short DVDAUPLHTQ;
                    short XKQKBDOCWY;XKQKBDOCWY=12485;if (XKQKBDOCWY) {
                        bool QWSSIFBHMF;
                        int ZBWZXLDSTP;
                    }
                    if (983>26447) {
                        bool SGZVLBRLWG;
                        short YRJBLXSPGD;
                    }
                    short EZICBMRZIW;
                    long long NSTGUSLUKY;NSTGUSLUKY=22408;
                }
            }
	}
	for(int i=1;i<=b;++i){
		q[i]=read();
            long long SLHLQNPAVR;SLHLQNPAVR=28715;
	}
	for(int i=1;i<=c;++i){
		r[i]=read();
            double EUIWYEYAXH;EUIWYEYAXH=2592;
	}
	sort(p+1,p+a+1,greater<int>());
        if (30448>12573) {
            int WWLQPHBVFU;WWLQPHBVFU=17689;
            if (21300>29093) {
                bool CIVTUOIXVW;
            }
        }
	sort(q+1,q+b+1,greater<int>());
        bool JVNAAHTOMC;JVNAAHTOMC=12144;if (JVNAAHTOMC) {
            long long YYBVYDOFIZ;
            double PUKHNXGHLR;PUKHNXGHLR=11134;
        }
	sort(r+1,r+c+1,greater<int>());
        bool BFZFAJAHJP;BFZFAJAHJP=27702;if (BFZFAJAHJP) {
            long long GRJKVDSUPK;GRJKVDSUPK=31083;if (GRJKVDSUPK) {
                if (7344>21031) {
                    if (13430>6930) {
                        int YZTEKYCEXH;
                        double RMGXTHTCXE;
                        short WOFOSURDYX;
                    }
                    double KYVQLKWMKV;
                }
                long long CJSSCLMZUU;CJSSCLMZUU=24416;
                if (1470>27735) {
                    int MMUICAJFAP;
                    if (5792>14230) {
                        double DPSXHZDHOT;
                        long long NPKNGIBVQT;
                        double UVEGIPSWFF;
                        short SRFYCDCVFU;
                        short CJRMQOIKBI;
                    }
                }
            }
            if (11216>22837) {
                long long MNKZBFRGFJ;
                short ICSTNOPDLO;ICSTNOPDLO=6349;if (ICSTNOPDLO) {
                    if (27645>14013) {
                        int FOLNJLTMDX;
                        long long RQGHCPFZMY;
                        long long CBANSDKKKB;
                        long long RDOHCWWIPX;
                    }
                    if (10160>24441) {
                        double VSVQHUFVMW;
                    }
                }
                int XPTKNPPOHX;XPTKNPPOHX=18014;
                if (3933>31689) {
                    int FNXJPICBKA;
                }
            }
            double BAGZRPCXQH;BAGZRPCXQH=11896;
        }
	for(int i=1;i<=x;++i){
		ans+=p[i],q1.push(p[i]);
            long long QLXZPYBXTJ;QLXZPYBXTJ=17162;
	}
	for(int i=1;i<=y;++i){
		ans+=q[i],q2.push(q[i]);
            if (2226>31142) {
                int EDWJMGBWHJ;EDWJMGBWHJ=32093;if (EDWJMGBWHJ) {
                    if (7027>23752) {
                        int YHRELXZZVW;
                        bool RYJUNBRLRB;
                        int ZBBCYZELXD;
                        double XOVMIKZQCQ;
                    }
                    if (19249>1295) {
                        short NQYISVVTYA;
                        int MBKFXAHLGL;
                    }
                }
                long long INKKETKECD;INKKETKECD=11296;if (INKKETKECD) {
                    if (24686>9034) {
                        bool WGAOOQUJVE;
                        short READJYRVNT;
                        int BCFYCVBDFN;
                    }
                    long long KXDKCDVDHB;KXDKCDVDHB=32087;if (KXDKCDVDHB) {
                        double RLEIWNVNCO;
                        int HIITETOHQF;
                    }
                }
                bool ACDKMGMZIU;ACDKMGMZIU=2482;
                long long AZWEDXJKJU;AZWEDXJKJU=16870;if (AZWEDXJKJU) {
                    double SQSUBQIXOX;SQSUBQIXOX=4131;
                }
            }
	}
	for(int i=1;i<=c;++i){
		if(q1.top()<q2.top()){
			if(r[i]>q1.top()){
				ans-=q1.top();
			q1.pop();
			ans+=r[i];
			q1.push(r[i]);
                    int RBLOCOYCBM;
			}
			else break;
                bool MGKIMRTBVJ;MGKIMRTBVJ=12312;
		}
		else{
			if(r[i]>q2.top()){
				ans-=q2.top();
				q2.pop();
                    if (15678>24959) {
                        long long DPKVGNJDGV;
                        double MWIBFCHIHZ;
                        bool ERUMOGUZXU;
                        short OLFHFMCUKU;
                    }
				ans+=r[i];
                    bool CDHTJRIYKA;CDHTJRIYKA=30206;
				q2.push(r[i]);
                    short JALMSBZZGB;JALMSBZZGB=25688;if (JALMSBZZGB) {
                        bool AERKZPHRUD;
                    }
			}
			else break;
                short ESZWCOSHMO;ESZWCOSHMO=6683;
		}
	}
	cout<<ans<<endl;
        long long XWQTSUOBKJ;XWQTSUOBKJ=15384;
	return 0;
        if (13622>17665) {
            if (29270>7054) {
                if (22287>31169) {
                    long long IHPGNGAVZG;IHPGNGAVZG=23009;if (IHPGNGAVZG) {
                        short RIEVARXIBJ;
                        double VDUUAUFBLK;
                    }
                    int EUMIRFOADH;EUMIRFOADH=18011;if (EUMIRFOADH) {
                        long long YEZTDCEQAR;
                        long long JZSQEUFOLF;
                    }
                }
                if (30590>17792) {
                    double ROVUUNZXIA;ROVUUNZXIA=24691;if (ROVUUNZXIA) {
                        long long VRNZFFTJJC;
                        double QKUXWPMXXB;
                        long long SYBGKUCCHZ;
                    }
                    if (11659>29295) {
                        double DDZXJOWAEE;
                        double KAOCOMMSZP;
                        long long YCVYZFPERN;
                    }
                }
            }
            short EBIZYMBQRV;EBIZYMBQRV=16688;
            long long AYAGVVAHNY;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:353:10: error: expected '}' at end of input
  353 |         }
      |          ^
a.cc:134:11: note: to match this '{'
  134 | int main(){
      |           ^