| Bay Area Programming Contest 2025 |
|---|
| Finished |
Lunchbox has two arrays $$$a_1, a_2, \ldots, a_n$$$ and $$$b_1, b_2, \ldots, b_n$$$, each of length $$$n$$$. It is guaranteed that $$$a_i \leq b_i$$$ for each $$$1 \leq i \leq n$$$.
He is allowed to perform either of the following two operations in any order, as many times as he wants (possibly zero):
Is it possible to turn $$$a$$$ into $$$b$$$?
Input consists of multiple tests. The first line contains $$$t$$$, the number of tests ($$$1 \leq t \leq 10^5$$$).
The first line of each test contains $$$n$$$, the length of the arrays ($$$1 \leq n \leq 10^5$$$).
The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).
The third line contains $$$n$$$ integers $$$b_1, b_2, \ldots, b_n$$$ ($$$1 \leq b_i \leq 10^9$$$).
It is guaranteed that the sum of $$$n$$$ across all tests does not exceed $$$10^5$$$.
For each test, output YES or NO.
731 3 51 3 631 3 51 3 721 11 112100000000051 2 3 4 56 7 8 9 1051 1 1 1 13 3 3 3 421 21 4
YES YES YES NO NO YES NO
In the first test, since there are initially $$$3$$$ odd elements in $$$a$$$, we are allowed to add $$$1$$$ (an odd integer) to $$$a_3$$$. After this operation, $$$a = [1, 3, 6] = b$$$.
In the second test, since there initially $$$0$$$ even elements in $$$a$$$, we are allowed to add $$$2$$$ (an even integer) to $$$a_3$$$. After this operation, $$$a = [1, 3, 7] = b$$$.
In the third test, it may be possible that $$$a=b$$$ without doing any operations.
In the fourth test, there are initially $$$0$$$ odd elements and $$$1$$$ even element, so we cannot perform any operations.
| Name |
|---|


