You are given two arrays, A and B of length N. In one operation, you can swap A[i] and B[i]. Find the maximum sum of A after performing at most K operations.
Input format
Output format
For each test case, print the maximum sum of A after performing at most K operations in a new line.
Constraints
1≤T≤101≤K≤N≤1050≤A[i],B[i]≤103
For test case 1: We can perform the operations at indexes 2, 4, and 5 (1-based indexing). A becomes [1,4,1,6,5]. Hence, the answer is 17.
For test case 2: We can perform the operations at index 1 (1-based indexing). A becomes [3,5,1]. Hence, the answer is 9.