Open Mahi1901 opened 1 year ago
Kasturi Mandlik Cummins college of engineering for women Dept: Electronics and telecommunication I would like to work on this issue. Can you please assign me this issue?
I have assigned. Happy coding!
Pranoti Patil CCOEW Comp Can you assign me this issue?
@Mahi1901 I have completed my assignment. Please do check and merge my pull request.
HEY!!! This is Aditi Sharma(SY-C) MKSSS's CCOEW Computer Engineering
I want to work on this issue Can you assign this to me?
Nikita Miraje CCOEW E&TC I want to work on this issue........Can you assign this to me?
There are two groups, one of NN boys and the other of NN girls numbered from 1 to NN.
You are given two arrays AA and BB containing NN numbers each, denoting the height of boys and girls in the group. You have to form NN couples, where each couple will consist of 1 boy and 1 girl.
Each couple has a LIKENESS VALUE, where
LIKENESS VALUE = height of girl in the couple + height of boy in that couple. You have to form NN couples in such a way that the maximum of LIKENESS VALUE of all the couples is minimum.
Note: - No boy or girl can form more than one couple.
Input
The first line of the input contains a single integer TT denoting the number of test cases. The description of T test cases follows. The first line of each test case contains a single integer NN: - number of boys and number of girls in the group. The second line of each test case contains NN space-separated integers, denoting the height of NN boys. The third line of each test case contains NN space-separated integers, denoting the height of NN girls. Output For each test case, print the maximum LIKENESS VALUE in a new line.
Constraints 1≤T≤5 1≤N≤2∗10^4 1≤Ai, Bi≤10^9, for all 1≤i≤N
Sample 1: Input 1 3 4 5 1 2 2 2 Output 7