AtCoder Beginner Contest 206(Sponsored by Panasonic)
F
Interval Game 2
AtCoder
⌀ 2221
原题
← E→
翻译中…

Problem Statement

翻译中…

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:

翻译中…
  • Alice and Bob alternately do the following operation, Alice going first.
  • From the $N$ intervals, choose one that does not intersect with any of the intervals that are already chosen.
翻译中…

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?

翻译中…

What is a half-open interval?A half-open interval $[X,Y)$ is an interval consisting of all real numbers $x$ satisfying $X \leq x < Y$.

翻译中…

Constraints

翻译中…
  • All values in input are integers.
  • $1 \le T \le 20$
  • $1 \le N \le 100$
  • $1 \le L_i < R_i \le 100$
翻译中…

Input

翻译中…

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

翻译中…

Output

翻译中…

Print $T$ lines. The $i$-th line should contain Alice if Alice wins in the $i$-th test case, and Bob if Bob wins.

翻译中…

样例

Input #1
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
Output #1
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. - Alice chooses the interval $[12,53)$. - Bob chooses the interval $[53,98)$. Note that $[12,53)$ and $[53,98)$ do not intersect since they are half-open. - Alice is unable to do an operation, and Bob wins. 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.
题目信息
题号
abc206_f
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。