384. Monu Bhaiya's Contest and Laptop Requirement



Monu Bhaiya, an exceptional instructor at Coding Blocks known for his remarkable mentoring skills, has decided to test the coding abilities of his hardworking students by organizing a coding contest. However, the students are not available at the same time for the test, as their arrival and departure times vary. Monu Bhaiya needs to ensure that no student has to wait for a laptop to attempt the contest. Your task is to assist him in determining the minimum number of laptops he needs to purchase for the hackathon.

Input Format

The first line of input contains a single integer T denoting the number of test cases.
The next line contains an integer N, representing the number of students.
The subsequent line consists of N space-separated integers, denoting the arrival times (Ai) of the students.
The next line contains N space-separated integers, representing the departure times (Di) of the students.

Output Format

Display the minimum number of laptops required for each test case, separated by a newline.



1 6 900 940 950 1100 1500 1800 910 1200 1120 1130 1900 2000




0 < A[i] <= 2400,
A[i] < D[i], where 0<=i

View Submissions