-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question 69 #151
Comments
Kasturi Mandlik |
I have assigned. Happy coding! |
Pranoti Patil |
Solution for issue Google-Developer-Student-Club-CCOEW#151
@Mahi1901 I have completed my assignment. Please do check and merge my pull request. |
HEY!!! I want to work on this issue |
Nikita Miraje |
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
The text was updated successfully, but these errors were encountered: