AtCoder Regular Contest 163
E
Chmin XOR Game
AtCoder
⌀ 3338
原题
← DF →
翻译中…

Problem Statement

翻译中…

Alice and Bob are playing a game using a length-$N$ sequence of non-negative integers $A=(A_1,A_2,\dots,A_N)$.

翻译中…

Starting with Alice, they take turns performing the following operation. The player who cannot make a move first loses.

翻译中…
  • Choose a non-negative integer $X$ such that there is an integer $i$ satisfying $A_i > A_i \oplus X$.
  • For each $1 \le i \le N$, replace $A_i$ with $\min(A_i,A_i \oplus X)$.
翻译中…

Determine who wins when both players play optimally.

翻译中…

Here, $\oplus$ represents the bitwise XOR.

翻译中…

You are given $T$ test cases. Find the answer for each of them.

翻译中…

Constraints

翻译中…
  • $1 \le T \le 100$
  • $1 \le N \le 100$
  • $0 \le A_i \le 10^9$
翻译中…

Input

翻译中…

The input is given from Standard Input in the following format:

翻译中…

T
\mathrm{case}_1
\mathrm{case}_2
\vdots
\mathrm{case}_T

翻译中…

Here, $\mathrm{case}_i$ is the $i$-th test case. Each test case is given in the following format:

翻译中…

N
A_1 A_2 \dots A_N

翻译中…

Output

翻译中…

Print $T$ lines.

翻译中…

The $i$-th line $(1 \le i \le T)$ should contain Alice if Alice wins, and Bob if Bob wins in the $i$-th test case.

翻译中…

样例

Input #1
5
2
3 1
5
1 1 1 1 1
4
0 0 0 0
4
8 1 6 4
5
3 8 7 12 15
Output #1
Bob
Alice
Bob
Bob
Alice
In the first test case, one possible game progression could be as follows. - Alice chooses $X=3$. This choice is valid because $3 > 3 \oplus 3(=0)$ for $i=1$. - $A=(3,1)$ becomes $A=(0,1)$. - Bob chooses $X=1$. This choice is valid because $1 > 1 \oplus 1(=0)$ for $i=2$. - $A=(0,1)$ becomes $A=(0,0)$. - Since Alice cannot choose any $X$, the game ends. In this case, Bob wins. In the second test case, one possible game progression could be as follows. - Alice chooses $X=1$. This choice is valid because $1 > 1 \oplus 1(=0)$ for $i=1$. - $A=(1,1,1,1,1)$ becomes $A=(0,0,0,0,0)$. - Since Bob cannot choose any $X$, the game ends. In this case, Alice wins.
题目信息
题号
arc163_e
时间限制
2 s
内存限制
1024 MB

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