Skip to content
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

Open
Mahi1901 opened this issue Oct 23, 2022 · 6 comments
Open

Question 69 #151

Mahi1901 opened this issue Oct 23, 2022 · 6 comments
Assignees

Comments

@Mahi1901
Copy link
Collaborator

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

@kasturimandlik
Copy link
Contributor

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?

@Mahi1901
Copy link
Collaborator Author

I have assigned. Happy coding!

@Mahi1901 Mahi1901 reopened this Oct 23, 2022
@pranotip283
Copy link
Contributor

Pranoti Patil
CCOEW
Comp
Can you assign me this issue?

kasturimandlik added a commit to kasturimandlik/Competitive-Coding that referenced this issue Oct 23, 2022
@kasturimandlik
Copy link
Contributor

@Mahi1901 I have completed my assignment. Please do check and merge my pull request.

@aditi3004
Copy link
Contributor

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?

@NikitaMiraje
Copy link
Contributor

Nikita Miraje
CCOEW
E&TC
I want to work on this issue........Can you assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants