The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 406 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Rahul is a very obedient student and do all the work given by his teacher. His teacher give a number of assignments everyday in such a way that each assignments have starting time as well as finishing time. The total time to complete the assigments is between the smallest starting time and largest finishing time(inclusive). Only problem was that, students could only do one assignment at a time and cheating was strictly not allowed.
Rahul always got the highest marks as he is able to complete the maximum number of assignments each day.One of his friend wants to find out how many assignments did he completes everyday but don't know how, So he needs your help in this.
First line contains an integer t denoting the number of testcases.
Each test case contains three lines.
First line contains 'n' total number of assignments.
Second line contains starting time for each assignment.
Third line contains finishing time for each assignment.
For each test case print maximum number of assignments Rahul completes.
Input: 2 5 2 4 3 1 5 3 7 5 6 8 3 1 5 4 7 6 5 Output: 3 2
Example case 1. He completes assignment 1(2,3) ,3(3,5),5(5,8)
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll