In Nlogonia city there are $$$n$$$ families,the $$$i_{ith}$$$ family has $$$b_i$$$ boys and $$$g_i$$$ girls.
For two integers $$$l$$$ and $$$r$$$ $$$(1 \le l \le r \le n)$$$ when we consider families in the range $$$[l,r]$$$, if it is possible to arrange all the boys and girls whose families are in the given range in couples, then the range $$$[l,r]$$$ is good.
Note that each boy in the given range can marry any girl from the given range,but he can't marry a girl from his family.
Your task is to count the number of good ranges.
The first line contains a single integer $$$t$$$ $$$(1 \le t \le 3 \times 10^5)$$$, the number of test cases.
The first line of each test case contains an integer $$$n$$$ $$$(1 \le n \le 3 \times 10^5)$$$, the number of families.
The second line of each test case contains $$$n$$$ integers $$$b_i$$$ $$$(1 \le b_i \le 10^9)$$$, the number of boys in each family.
The third line of each test case contains $$$n$$$ integers $$$g_i$$$ $$$(1 \le g_i \le 10^9)$$$, the number of girls in each family.
It is guaranteed that the sum of $$$n$$$ overall test cases doesn't exceed $$$3 \times 10^5$$$.
For each query in each test case print the number of good ranges.
532 2 21 1 441 2 2 52 1 3 443 2 2 13 1 1 352 1 2 3 11 2 1 1 352 3 1 2 33 3 2 3 2
1 2 2 4 1
| Name |
|---|


