정렬 (182)
n, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
for _ in range(k):
maxx = max(b)
minn = min(a)
a[a.index(minn)] = maxx
b[b.index(maxx)] = minn
print(sum(a))
n, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
for _ in range(k):
a.sort()
b.sort(reverse=True)
for i in range(k):
if (a[i] < b[i]):
a[i], b[i] = b[i], a[i]
else:
break
print(sum(a))