# Running Rivalry

Easy
33.3% Acceptance

Alice and Bob have taken up running and are interested in tracking their progress by comparing their daily distances.

For a stretch of $N$ days, Alice ran $A_i$ meters and Bob ran $B_i$ meters on day $i$.

On any given day,

• Alice feels discontent if Bob's distance is more than double hers, and content otherwise.
• Bob feels discontent if Alice's distance is more than double his, and content otherwise.

For instance, on a specific day:

• Should Alice run $200$ meters and Bob $500$, Alice would be discontent while Bob would be content.
• Should Alice cover $500$ meters and Bob $240$, Alice would be content while Bob would be discontent.
• If Alice runs $300$ meters and Bob $500$, both would find contentment.

Determine the number of days where both Alice and Bob felt content.

## Input Format

• The initial line of input presents a single integer $T$, representing the count of test cases.
• Each test case is divided into three lines.
• The opening line of a test case states a single integer $N$ — the count of days.
• The subsequent line lists $N$ integers separated by spaces $A_1, A_2, \ldots, A_N$ — the distances Alice ran each day.
• The last line also lists $N$ integers separated by spaces $B_1, B_2, \ldots, B_N$ — the distances Bob ran each day.

## Output Format

For every test case, report in a new line the tally of days when both Alice and Bob were content.

## Constraints

• $1 \leq T \leq 1000$
• $1 \leq N \leq 100$
• $1 \leq A_i, B_i \leq 10^5$

## Sample Test Cases (with explanations)

### Case #1:

Input:

4
3
100 200 300
300 200 100
4
1000 1000 1000 1000
400 500 600 1200
4
800 399 1400 532
2053 2300 3400 23
5
800 850 900 950 1000
600 800 1000 1200 1400


Output:

1
3
0
5


#### Explanation

Test case $1$: Alice is discontent on the first day, as her $100$ meters is significantly less than Bob's $300$; Bob's distance being over twice of Alice's.
On the contrary, Bob is discontent on the third day.
The second day sees both Alice and Bob content, leading to the answer being $1$.

Test case $2$: Day $1$ has Bob discontent but content on the remaining days, whereas Alice is content throughout, making them both content on three days — the second, third, and fourth days.

Test case $3$: Days $1, 2, 3$ see Alice discontent and day $4$ sees Bob discontent.

Test case $4$: Across all five days, both Alice and Bob are content.