Codeforces Global Round 22
C
Even Number Addicts
Codeforces
1500
原题
← BD →
翻译中…

Alice and Bob are playing a game on a sequence $a_1, a_2, \dots, a_n$ of length $n$. They move in turns and Alice moves first.

翻译中…

In the turn of each player, he or she should select an integer and remove it from the sequence. The game ends when there is no integer left in the sequence.

翻译中…

Alice wins if the sum of her selected integers is even; otherwise, Bob wins.

翻译中…

Your task is to determine who will win the game, if both players play optimally.

翻译中…

Input

翻译中…

Each test contains multiple test cases. The first line contains an integer $t$ ($1 \leq t \leq 100$) — the number of test cases. The following lines contain the description of each test case.

翻译中…

The first line of each test case contains an integer $n$ ($1 \leq n \leq 100$), indicating the length of the sequence.

翻译中…

The second line of each test case contains $n$ integers $a_1, a_2, \dots, a_n$ ($-10^9 \leq a_i \leq 10^9$), indicating the elements of the sequence.

翻译中…

Output

翻译中…

For each test case, output "Alice" (without quotes) if Alice wins and "Bob" (without quotes) otherwise.

翻译中…

Note

翻译中…

In the first and second test cases, Alice always selects two odd numbers, so the sum of her selected numbers is always even. Therefore, Alice always wins.

翻译中…

In the third test case, Bob has a winning strategy that he always selects a number with the same parity as Alice selects in her last turn. Therefore, Bob always wins.

翻译中…

In the fourth test case, Alice always selects two even numbers, so the sum of her selected numbers is always even. Therefore, Alice always wins.

翻译中…

样例

Input #1
4
3
1 3 5
4
1 3 5 7
4
1 2 3 4
4
10 20 30 40
Output #1
Alice
Alice
Bob
Alice
InputCopy OutputCopy
题目信息
题号
1738C
时间限制
2 s
内存限制
512 MB
标签
动态规划
博弈论
贪心
数学

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