Nayak loves Biryani especially "Rehan's Biryani". Today he went over to have some of it. To his surprise, the waiter turned out to be an engineer and refuses to serve him Unless Nayak solves his puzzle.
The shop contains different glasses Whisky Glasses, Wine Glasses, Beer Glasses, Shots Glasses etc.
The waiter makes two queues A and B of length N of glasses and arranged them in non increasing order of their height i.e; A[i]>=A[i+1] and B[i]>=B[i+1] for all i, 0 ≤ i < N-1.
The Jollyness of two glasses is given by: Jolly(A[i],B[j]) = j - i , if j >=i and B[j] >= A[i], or 0 otherwise.
Find the maximum jollyness in the queues i.e; max(Jolly(A[i],B[j])) for 0≤ i, j< n-1.
Nayak is very hungry so can't really focus. You are required to help him.
Input Format:
The first line contains an integer T, denoting the number of test cases.
The next line contains an integer N, denoting the size of the two queues.
The next 2 line contains N integers denoting the height of glasses in queue A and queue B.
Output format:
Print the maximum Jollyness in the queues.
Constraints:
1 <= T <= 50
1 <= N <= 105
1 <= Ai, Bi <= 1012
In the first case, we can see that glass of height 3 in the second queue is also present in the first queue, and the difference between their positions is 5. So, the answer is 5.