You are given an array A of length N and array B of length M.
A special sequence can be defined in either of the two ways:
Find the maximum length of a special sequence that can be formed.
Input format
Output format
For each test case, print the maximum length of a special sequence in a new line.
Constraints
1≤T≤51≤N≤2×103−106≤A[i],B[i]≤106
For Test Case 1 :-
For Test Case 2 :-