Question
Streak Spark
Alice and Bob are keen on keeping their messaging streak alive, where both must send at least one message daily to maintain it. If either misses a day, the streak resets to 0. Over N days, Alice sent Ai messages and Bob sent Bi messages on the ith day. Determine the maximum streak count they achieved.
Input
The first line of input will contain a single integer T, denoting the number of test cases.
Each test case consists of multiple lines of input.
The first line of each test case contains an integer N - the number of days you observed.
The second lines contains N space-separated integers - A1, A2..., AN the number of snaps Alice sent to Bob on the ith day.
The third lines contains N space-separated integers - B1, B2..., BN, the number of snaps Bob sent to Alice on the ith day.
Constraints
1 ≤ T ≤ 100
1 ≤ N ≤ 1000
0 ≤ Ai, Bi ≤ 100
Each test case consists of multiple lines of input.
The first line of each test case contains an integer N - the number of days you observed.
The second lines contains N space-separated integers - A1, A2..., AN the number of snaps Alice sent to Bob on the ith day.
The third lines contains N space-separated integers - B1, B2..., BN, the number of snaps Bob sent to Alice on the ith day.
Constraints
1 ≤ T ≤ 100
1 ≤ N ≤ 1000
0 ≤ Ai, Bi ≤ 100
Output
For each test case, output on a new line, the maximum streak count they achieved in those N days.
Example
Sample Input
2
3
3 1 2
2 4 1
2
0 0
10 10
Sample Output
3
0
Explanation
Test case 1: For all 3 days, both Alice and Bob sent at least one snap per day. Thus, at the end of third day, the streak count is 3.
Test case 2: Alice did not send any snap to Bob. Thus, at the streak count remains 0 on both days.
2
3
3 1 2
2 4 1
2
0 0
10 10
Sample Output
3
0
Explanation
Test case 1: For all 3 days, both Alice and Bob sent at least one snap per day. Thus, at the end of third day, the streak count is 3.
Test case 2: Alice did not send any snap to Bob. Thus, at the streak count remains 0 on both days.