Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y, a, b, c = map(int, input().split())

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    l_p = len(p)
    p_np[:l_p] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    l_q = len(q)
    q_np[:l_q] = q[:]
ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    if (r[i] > ap_np[i]):
        ap_np[i] = r[i]
    if i >= x + y:
        break
print(int(ap_np.sum()))

Fixed submission:
import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y, a, b, c = map(int, input().split())

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    l_p = len(p)
    p_np[:l_p] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    l_q = len(q)
    q_np[:l_q] = q[:]
ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    if i >= x + y:
        break
    if (r[i] > ap_np[i]):
        ap_np[i] = r[i]
print(int(ap_np.sum()))

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y, a, b, c = map(int, input().split())

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    p_np[:len(p)] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    q_np[:len(q)] = q[:]    

ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    if (r[i] > ap_np[i]):
        ap_np[i] = r[i]
    if i >= x + y:
        break
print(int(ap_np.sum()))

Fixed submission:
import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y, a, b, c = map(int, input().split())

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    l_p = len(p)
    p_np[:l_p] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    l_q = len(q)
    q_np[:l_q] = q[:]
ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    if i >= x + y:
        break
    if (r[i] > ap_np[i]):
        ap_np[i] = r[i]
print(int(ap_np.sum()))

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y, a, b, c = map(int, input().split())

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    p_np[:len(p)] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    q_np[:len(q)] = q[:]    

ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    if (r[i] > ap_np[i]):
        ap_np[i] = r[i]
        break
print(int(ap_np.sum()))

Fixed submission:
import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y, a, b, c = map(int, input().split())

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    l_p = len(p)
    p_np[:l_p] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    l_q = len(q)
    q_np[:l_q] = q[:]
ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    if i >= x + y:
        break
    if (r[i] > ap_np[i]):
        ap_np[i] = r[i]
print(int(ap_np.sum()))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y, a, b, c = map(int, input().split())

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    p_np[:len(p)] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    q_np[:len(q)] = q[:]    

ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    for api in range(ap_cnt, x+y):
        if (r[i] > ap_np[api]):
            ap_np[api] = r[i]
            ap_cnt += 1
            break
print(int(ap_np.sum()))

Fixed submission:
import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y, a, b, c = map(int, input().split())

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    l_p = len(p)
    p_np[:l_p] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    l_q = len(q)
    q_np[:l_q] = q[:]
ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    if i >= x + y:
        break
    if (r[i] > ap_np[i]):
        ap_np[i] = r[i]
print(int(ap_np.sum()))