Problem:
Score : 500 points

Problem Statement

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 apples of deliciousness r_1,r_2, \dots, r_C.

Before eating a colorless apple, you can paint it red or green, and it will count as a red or green apple, respectively.

From 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.

Find the maximum possible sum of the deliciousness of the eaten apples that can be achieved when optimally coloring zero or more colorless apples.

Constraints

1 \leq X \leq A \leq 10^5

1 \leq Y \leq B \leq 10^5

1 \leq C \leq 10^5

1 \leq p_i \leq 10^9

1 \leq q_i \leq 10^9

1 \leq r_i \leq 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y A B C
p_1 p_2 ... p_A
q_1 q_2 ... q_B
r_1 r_2 ... r_C

Output

Print the maximum possible sum of the deliciousness of the eaten apples.

Sample Input 1

1 2 2 2 1
2 4
5 1
3

Sample Output 1

12

The maximum possible sum of the deliciousness of the eaten apples can be achieved as follows:

Eat the 2-nd red apple.

Eat the 1-st green apple.

Paint the 1-st colorless apple green and eat it.

Sample Input 2

2 2 2 2 2
8 6
9 1
2 1

Sample Output 2

25

Sample Input 3

2 2 4 4 4
11 12 13 14
21 22 23 24
1 2 3 4

Sample Output 3

74

Solution in OCaml (4.02.3) (judge verdict: Runtime Error)

let read_int_array n = Array.init n (fun _ -> Scanf.scanf " %d" (fun x -> x))

let x, y, a, b, c = Scanf.scanf "%d %d %d %d %d" (fun x y a b c -> x, y, a, b, c)

let p = read_int_array a
let q = read_int_array b
let r = read_int_array c

let cmp x y = y - x;;

Array.sort cmp p;
Array.sort cmp q;
Array.sort cmp r;

let rec f i (a, b, c) (ai, bi, ci) ret =
  if i = x + y then ret
  else if b <= a && c <= a then
    f (i+1) ((if ai = x-1 then -1 else p.(ai+1)), b, c) (ai+1, bi, ci) (ret + a)
  else if a <= b && c <= b then
    f (i+1) (a, (if bi = y-1 then -1 else q.(bi+1)), c) (ai, bi+1, ci) (ret + b)
  else
    f (i+1) (a, b, (if ci = c-1 then -1 else q.(ci+1))) (ai, b, ci+1) (ret + c)
in
print_int (f 0 (p.(0), q.(0), r.(0)) (0, 0, 0) 0)