Score : $600$ points
Solve the problem below for $T$ test cases.
We have $N$ half-open intervals $[L_i,R_i)$ ($1 \le i \le N$). Using them, Alice and Bob will play the following game:
The player who gets unable to do the operation loses, and the other player wins.
Which player will win if both players play optimally to win?
Input is given from Standard Input. The first line is in the following format:
$T$
Then, $T$ test cases follow, each of which is in the following format:
$N$ $L_1$ $R_1$ $L_2$ $R_2$ $\vdots$ $L_N$ $R_N$
Print $T$ lines.
The $i$-th line should contain Alice
if Alice wins in the $i$-th test case, and Bob
if Bob wins.
5 3 53 98 8 43 12 53 10 4 7 5 7 3 7 4 5 5 8 6 9 4 8 5 10 1 9 5 10 2 58 98 11 29 6 79 83 44 83 38 74 49 88 18 45 64 99 1 5 9
Bob Alice Bob Alice Alice
This input contains five test cases.
For the first test case, we will show one possible progression of the game below.
These moves may not be the best choices for them, but we can show that Bob will win if both play optimally.
As seen in the second test case, there can be multiple occurrences of the same interval within a test case.