You are given two arrays $a$ and $b$ both consisting of $n$ positive (greater than zero) integers. You are also given an integer $k$.

In one move, you can choose two indices $i$ and $j$ ($1 \le i, j \le n$) and swap $a_i$ and $b_j$ (i.e. $a_i$ becomes $b_j$ and vice versa). Note that $i$ and $j$ can be equal or different (in particular, swap $a_2$ with $b_2$ or swap $a_3$ and $b_9$ both are acceptable moves).

Your task is to find the maximum possible sum you can obtain in the array $a$ if you can do no more than (i.e. at most) $k$ such moves (swaps).

You have to answer $t$ independent test cases.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 200$) — the number of test cases. Then $t$ test cases follow.

The first line of the test case contains two integers $n$ and $k$ ($1 \le n \le 30; 0 \le k \le n$) — the number of elements in $a$ and $b$ and the maximum number of moves you can do. The second line of the test case contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 30$), where $a_i$ is the $i$-th element of $a$. The third line of the test case contains $n$ integers $b_1, b_2, \dots, b_n$ ($1 \le b_i \le 30$), where $b_i$ is the $i$-th element of $b$.


-----Output-----

For each test case, print the answer — the maximum possible sum you can obtain in the array $a$ if you can do no more than (i.e. at most) $k$ swaps.


-----Example-----
Input
5
2 1
1 2
3 4
5 5
5 5 6 6 5
1 2 5 4 3
5 3
1 2 3 4 5
10 9 10 10 9
4 0
2 2 4 3
2 4 2 3
4 4
1 2 2 1
4 4 5 4

Output
6
27
39
11
17



-----Note-----

In the first test case of the example, you can swap $a_1 = 1$ and $b_2 = 4$, so $a=[4, 2]$ and $b=[3, 1]$.

In the second test case of the example, you don't need to swap anything.

In the third test case of the example, you can swap $a_1 = 1$ and $b_1 = 10$, $a_3 = 3$ and $b_3 = 10$ and $a_2 = 2$ and $b_4 = 10$, so $a=[10, 10, 10, 4, 5]$ and $b=[1, 9, 3, 2, 9]$.

In the fourth test case of the example, you cannot swap anything.

In the fifth test case of the example, you can swap arrays $a$ and $b$, so $a=[4, 4, 5, 4]$ and $b=[1, 2, 2, 1]$.
[{"code": "import sys\ninput = sys.stdin.readline\nrInt = lambda: int(input())\nmInt = lambda: list(map(int, input().split()))\nrLis = lambda: list(map(int, input().split()))\n\nt = int(input())\nfor _ in range(t):\n    n, k = mInt()\n    a = rLis()\n    b = rLis()\n    a.sort()\n    b.sort(reverse = True)\n    for i in range(k):\n        if a[i] < b[i]:\n            a[i] = b[i]\n    print(sum(a))\n", "passed": true, "time": 0.15, "memory": 14084.0, "status": "done"}, {"code": "q = int(input())\nfor _ in range(q):\n\tn,k = map(int,input().split())\n\ta = list(map(int,input().split()))\n\tb = list(map(int,input().split()))\n\ta.sort()\n\tb.sort()\n\tb.reverse()\n\ti = 0\n\twhile i < k and b[i] >= a[i]:\n\t\ta[i] = b[i]\n\t\ti += 1\n\tprint(sum(a))", "passed": true, "time": 0.18, "memory": 14232.0, "status": "done"}, {"code": "T = int(input())\nfor t in range(T):\n    n, k = list(map(int, input().split()))\n\n    a = list(map(int, input().split()))\n    b = list(map(int, input().split()))\n\n    sa = sorted(a)\n    sb = sorted(b, reverse=True)\n\n    for i in range(k):\n        if sa[i] < sb[i]:\n            sa[i] = sb[i]\n        else:\n            break\n\n    res = sum(sa)\n    print(res)\n", "passed": true, "time": 0.19, "memory": 14264.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n, k = map(int, input().split())\n    a = list(map(int, input().split()))\n    b = list(map(int, input().split()))\n    a.sort()\n    b.sort()\n    b.reverse()\n    s = sum(a)\n    for i in range(k):\n        if b[i]-a[i] <= 0:\n            break\n        s += b[i]-a[i]\n    print(s)", "passed": true, "time": 0.18, "memory": 14212.0, "status": "done"}, {"code": "def read_int():\n    return int(input())\n\n\ndef read_ints():\n    return list(map(int, input().split(' ')))\n\n\nt = read_int()\nfor case_num in range(t):\n    n, k = read_ints()\n    a = list(read_ints())\n    b = list(read_ints())\n    a.sort()\n    b.sort(reverse=True)\n    for i in range(k):\n        if a[i] < b[i]:\n            a[i] = b[i]\n        else:\n            break\n    print(sum(a))\n", "passed": true, "time": 0.27, "memory": 14088.0, "status": "done"}, {"code": "\nt = int(input())\n\nfor loop in range(t):\n\n    n,k = list(map(int,input().split()))\n\n    a = list(map(int,input().split()))\n    b = list(map(int,input().split()))\n\n    for i in range(k):\n\n        a.sort()\n        b.sort()\n\n        if a[0] < b[-1]:\n\n            tmp = a[0]\n            a[0] = b[-1]\n            b[-1] = tmp\n\n    print(sum(a))\n", "passed": true, "time": 0.15, "memory": 14292.0, "status": "done"}, {"code": "from sys import stdin, stdout, setrecursionlimit\nfor _ in range(int(input())):\n    n, k = list(map(int, input().split()))\n    a = sorted([int(i) for i in input().split()])\n    b = sorted([int(i) for i in input().split()], reverse = True)\n    for i in range(k):\n        if a[i] > b[i]: break\n        else: a[i], b[i] = b[i], a[i]\n    print(sum(a))\n\n\n\n\n\n\n\n", "passed": true, "time": 0.15, "memory": 14104.0, "status": "done"}, {"code": "import math \ndef ri():\n    return map(int,input().split())\ndef li():\n    return list(map(int,input().split()))\ndef inp():\n    return int(input())\ndef si():\n    return input()\ndef pYes():\n    print(\"YES\")\ndef pNo():\n    print(\"NO\")\ndef plist(l):\n    print(\"\".join(l))\nt = int(input())\nfor i in range(t):\n    n,k= ri()\n    a= li()\n    b=li()\n    a.sort()\n    b.sort(reverse=True)\n    for i in range(k):\n        if a[i]<b[i]:\n            a[i]=b[i]\n        else:\n            break\n    print(sum(a))    ", "passed": true, "time": 0.15, "memory": 14312.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n,k = map(int,input().split())\n    a = [*map(int,input().split())]\n    b = [*map(int,input().split())]\n    a.sort()\n    b.sort(reverse=True)\n    for i in range(k):\n        if(a[i]<b[i]):\n            tmp = a[i]\n            a[i] = b[i]\n            b[i] = tmp\n    print(sum(a))", "passed": true, "time": 0.17, "memory": 14096.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n,k=list(map(int,input().split()))\n    a=sorted(list(map(int,input().split())))\n    b= sorted(list(map(int, input().split())))\n    n-=1\n    for i in range(k):\n        if a[i]<b[n]:\n            a[i]=b[n]\n            n-=1\n        else:\n            break\n    print(sum(a))\n", "passed": true, "time": 0.28, "memory": 14076.0, "status": "done"}, {"code": "T = int(input()) \nfor _ in range (T): \n\n    n,k = map(int, input().split()) \n    A = list(map(int, input().split())) \n    B = list(map(int, input().split())) \n    A.sort() \n    B.sort() \n    for i in range (k): \n        A[i] = max (A[i], B[n-i-1]) \n    print (sum(A)) ", "passed": true, "time": 0.18, "memory": 14120.0, "status": "done"}, {"code": "import sys\nimport os\nimport time\nimport collections\nfrom collections import Counter, deque\nimport itertools\nimport math\nimport timeit\nimport random\nimport string\n\n#########################\n# imgur.com/Pkt7iIf.png #\n#########################\n\ndef sieve(n):\n    if n < 2: return list()\n    prime = [True for _ in range(n + 1)]\n    p = 3\n    while p * p <= n:\n        if prime[p]:\n            for i in range(p * 2, n + 1, p):\n                prime[i] = False\n        p += 2\n    r = [2]\n    for p in range(3, n + 1, 2):\n        if prime[p]:\n            r.append(p)\n    return r\n\ndef divs(n, start=1):\n    divisors = []\n    for i in range(start, int(math.sqrt(n) + 1)):\n        if n % i == 0:\n            if n / i == i:\n                divisors.append(i)\n            else:\n                divisors.extend([i, n // i])\n    return divisors\n\ndef divn(n, primes):\n    divs_number = 1\n    for i in primes:\n        if n == 1:\n            return divs_number\n        t = 1\n        while n % i == 0:\n            t += 1\n            n //= i\n        divs_number *= t\n\ndef flin(d, x, default=-1):\n    left = right = -1\n    for i in range(len(d)):\n        if d[i] == x:\n            if left == -1: left = i\n            right = i\n    if left == -1:\n        return default, default\n    else:\n        return left, right\n\ndef ceil(n, k): return n // k + (n % k != 0)\ndef ii(): return int(input())\ndef mi(): return map(int, input().split())\ndef li(): return list(map(int, input().split()))\ndef lcm(a, b): return abs(a * b) // math.gcd(a, b)\ndef prr(a, sep=' ', end='\\n'): print(sep.join(map(str, a)), end=end)\ndef dd(): return collections.defaultdict(int)\ndef ddl(): return collections.defaultdict(list)\n\n########################################################################################################################\n# input = sys.stdin.readline\n\nfor _ in range(ii()):\n    n, m = mi()\n    a = sorted(li())\n    b = sorted(li(), reverse=True)\n    for i in range(m):\n        if a[i] < b[i]:\n            a[i], b[i] = b[i], a[i]\n    print(sum(a))\n", "passed": true, "time": 0.29, "memory": 14392.0, "status": "done"}, {"code": "import sys\n\nreadline = sys.stdin.readline\nreadall = sys.stdin.read\nns = lambda: readline().rstrip()\nni = lambda: int(readline().rstrip())\nnm = lambda: map(int, readline().split())\nnl = lambda: list(map(int, readline().split()))\nprn = lambda x: print(*x, sep='\\n')\n\n\ndef solve():\n    n, k = nm()\n    a = nl()\n    b = nl()\n    a.sort()\n    b.sort(reverse=True)\n    for i in range(k):\n        if a[i] >= b[i]:\n            break\n        a[i] = b[i]\n    print(sum(a))\n    return\n\n# solve()\n\nT = ni()\nfor _ in range(T):\n    solve()\n", "passed": true, "time": 0.21, "memory": 14236.0, "status": "done"}, {"code": "# int(input())\n# [int(s) for s in input().split()]\n# input()\n\n\ndef solve():\n    t = int(input())\n\n    for i in range(t):\n        n, k = [int(s) for s in input().split()]\n        a = sorted([int(s) for s in input().split()])\n        b = sorted([int(s) for s in input().split()], reverse=True)\n\n        for j in range(k):\n            if a[j] <= b[j]:\n                a[j] = b[j]\n\n        print(sum(a))\n\n\ndef __starting_point():\n    solve()\n__starting_point()", "passed": true, "time": 0.18, "memory": 14200.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n, k = [int(x) for x in input().split()]\n    a = sorted([int(x) for x in input().split()])\n    b = sorted([int(x) for x in input().split()], reverse=True)\n    for i in range(k):\n        if a[i] < b[i]:\n            a[i], b[i] = b[i], a[i]\n    print(sum(a))\n", "passed": true, "time": 0.18, "memory": 14284.0, "status": "done"}, {"code": "import sys\ninput = sys.stdin.readline\nimport heapq\n\nt=int(input())\nfor tests in range(t):\n    n,k=list(map(int,input().split()))\n    A=list(map(int,input().split()))\n    B=sorted(map(int,input().split()),reverse=True)\n\n    heapq.heapify(A)\n\n    for i in range(k):\n        x=heapq.heappop(A)\n        if B[i]>x:\n            x=B[i]\n        heapq.heappush(A,x)\n\n    print(sum(A))\n            \n", "passed": true, "time": 0.14, "memory": 14332.0, "status": "done"}, {"code": "from sys import stdin, stdout  \ninput = stdin.readline\n#print = stdout.write\n\nfor _ in range(int(input())):\n    n, k = list(map(int, input().split()))\n    a = sorted(list(map(int, input().split())))\n    b = sorted(list(map(int, input().split())))\n    for i in range(k):\n        if a[i] >= b[n - i - 1]:\n            break\n        a[i] = b[n - i - 1]\n    print(sum(a))\n", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n, k = map(int, input().split())\n    a = sorted(map(int, input().split()))\n    b = sorted(map(int, input().split()))\n\n    for i in range(k):\n        if a[i] < b[n-i-1]:\n            a[i], b[n-i-1] = b[n-i-1], a[i]\n        else:\n            break\n\n    print(sum(a))", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "t=int(input())\nwhile t>0:\n    n,k=map(int,input().split())\n    a=list(map(int,input().split()))\n    b=list(map(int,input().split()))\n    a.sort()\n    b.sort()\n    for i in range(k):\n        if a[0]<b[-1]:\n            a[0],b[-1]=b[-1],a[0]\n        a.sort()\n        b.sort()\n    print(sum(a))\n    t-=1", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "\nT = int(input())\nn = [0]*T\nm = [0]*T\na = [0]*T\nb = [0]*T\n\nfor t in range(T):\n  n, k = [int(i) for i in input().split(' ')]\n  a = [int(i) for i in input().split(' ')]\n  b = [int(i) for i in input().split(' ')]\n  a.sort()\n  b.sort()\n  for i in range(k):\n    if a[i]<b[n-i-1]:\n      a[i] = b[n-i-1]\n    else:\n      break\n  print(sum(a))\n\n\n", "passed": true, "time": 0.14, "memory": 14192.0, "status": "done"}, {"code": "t = int(input())\nfor t in range(t):\n    n, k = [int(i) for i in input().split(\" \")]\n    a = [int(i) for i in input().split(\" \")]\n    b = [int(i) for i in input().split(\" \")]\n    for i in range(k):\n        aMin = min(a)\n        bMax = max(b)\n        if bMax > aMin:\n            a[a.index(aMin)], b[b.index(bMax)] = b[b.index(bMax)], a[a.index(aMin)]\n    print(sum(a))", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "t=int(input())\nfor i in range(t):\n    n,k=map(int,input().split())\n    a=list(map(int,input().split()))\n    b=list(map(int,input().split()))\n    a.sort()\n    b.sort()\n    b.reverse()\n    ans=sum(a)\n    for i in range(k):\n        if a[i]<b[i]:\n            ans+=b[i]-a[i]\n    print(ans)", "passed": true, "time": 0.14, "memory": 14316.0, "status": "done"}, {"code": "for f in range(int(input())):\n    n,k=map(int,input().split())\n    a=list(map(int,input().split()))\n    b=list(map(int,input().split()))\n    a.sort()\n    b.sort(reverse=True)\n    x=0\n    while x<k and a[x]<b[x]:\n        a[x]=b[x]\n        x+=1\n    print(sum(a))", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "t = int(input())\nwhile t:\n    n, k = map(int, input().split())\n    a = [int(x) for x in input().split()]\n    b = [int(x) for x in input().split()]\n    a.sort()\n    b.sort(reverse=True)\n    for i in range(k):\n        a[i] = max(a[i], b[i])\n    print(sum(a))\n    t-=1", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "t = int(input())\nfor i in range(t):\n    n, k = map(int, input().split())\n    a = [int(i) for i in input().split()]\n    b = [int(i) for i in input().split()]\n    s = sum(a)\n    a.sort()\n    b.sort()\n    cnt = 0\n    while cnt < len(b) and cnt < len(a) and cnt < k:\n        if b[len(b) - cnt - 1] > a[cnt]:\n            s +=b[len(b) - cnt - 1] - a[cnt]\n        cnt += 1\n    print(s)", "passed": true, "time": 0.14, "memory": 14316.0, "status": "done"}, {"code": "import sys\nagGK = int(input())\nfor _ in range(agGK):\n    n, k = map(int, input().split())\n    a = [int(i) for i in input().split(' ', n - 1)]\n    b = [int(i) for i in input().split(' ', n - 1)]\n    a.sort()\n    b.sort()\n    if n - k - 1 == 0:\n    \tg = 0\n    else:\n    \tg = n - k - 1\n    for i in range(n-1, g, -1):\n    \tif a[n-i-1] < b[i]:\n    \t\ta[n-i-1] = b[i]\n    \telse:\n    \t\tbreak\n    print(sum(a))", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}]