{"problem":{"name":"Red and Green Apples","description":{"content":"You are going to eat $X$ red apples and $Y$ green apples.   You have $A$ red apples of deliciousness $p_1,p_2, \\dots, p_A$, $B$ green apples of deliciousness $q_1,q_2, \\dots, q_B$, and $C$ colorless a","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc160_e"},"statements":[{"statement_type":"Markdown","content":"You are going to eat $X$ red apples and $Y$ green apples.  \nYou have $A$ red apples of deliciousness $p_1,p_2, \\dots, p_A$, $B$ green apples of deliciousness $q_1,q_2, \\dots, q_B$, and $C$ colorless apples of deliciousness $r_1,r_2, \\dots, r_C$.  \nBefore eating a colorless apple, you can paint it red or green, and it will count as a red or green apple, respectively.  \nFrom the apples above, you will choose the apples to eat while making the sum of the deliciousness of the eaten apples as large as possible.  \nFind the maximum possible sum of the deliciousness of the eaten apples that can be achieved when optimally coloring zero or more colorless apples.\n\n## Constraints\n\n*   $1 \\leq X \\leq A \\leq 10^5$\n*   $1 \\leq Y \\leq B \\leq 10^5$\n*   $1 \\leq C \\leq 10^5$\n*   $1 \\leq p_i \\leq 10^9$\n*   $1 \\leq q_i \\leq 10^9$\n*   $1 \\leq r_i \\leq 10^9$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$X$ $Y$ $A$ $B$ $C$\n$p_1$ $p_2$ $...$ $p_A$\n$q_1$ $q_2$ $...$ $q_B$\n$r_1$ $r_2$ $...$ $r_C$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc160_e","tags":[],"sample_group":[["1 2 2 2 1\n2 4\n5 1\n3","12\n\nThe maximum possible sum of the deliciousness of the eaten apples can be achieved as follows:\n\n*   Eat the $2$\\-nd red apple.\n*   Eat the $1$\\-st green apple.\n*   Paint the $1$\\-st colorless apple green and eat it."],["2 2 2 2 2\n8 6\n9 1\n2 1","25"],["2 2 4 4 4\n11 12 13 14\n21 22 23 24\n1 2 3 4","74"]],"created_at":"2026-03-03 11:01:14"}}