Minimum Sum
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
There are two arrays of positive integers and . Find a permutation of numbers , for which the sum
is minimal. Each number should appear only once in the permutation.
Input
The first line contains the number of elements in the arrays. The second line contains the elements of the first array, and the third line contains the elements of the second array. The array elements do not exceed .
Output
Print the minimal value of required sum.
Examples
Input #1
Answer #1
Submissions 2K
Acceptance rate 45%