402597: GYM100814 L Candy Jars

Memory Limit:1024 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

L. Candy Jarstime limit per test1 secondmemory limit per test1024 megabytesinputstandard inputoutputstandard output

Alice and Bob love to play the following game, they have N jars and the rules are as follows:

  • Each jar has a strictly positive number of candies.
  • Alice plays first and the two players alternate.
  • In his/her turn, the player selects any jar X, throws away all candies in all the other jars and redistributes the candies in X among all jars in anyway he/she wishes, as long as in the end there is at least one candy in each jar (including X).
  • The player who cannot make a move in his/her turn loses the game.

Assuming both players play optimally, you are asked the following question who wins the game? Playing optimally means that both players will have insight into all possible next moves and will play in such a way to maximize their chance of winning without making a mistake. However, if all moves lead to the other player winning, then this player still has to play, and any move would be equivalent.

Input

The first line contains the number of test cases T. Each of the next T lines contains an integer (2 ≤ N ≤ 1, 000) the number of jars, and N integers (1 ≤ ai ≤ 1000) where ai is the number of candies in jar i.

Output

Output T lines, one for each test case, containing "Alice" if Alice wins the game, or "Bob" otherwise.

ExamplesInput
3
4 1 2 3 3
4 1 2 3 4
2 1 3
Output
Bob
Alice
Bob

加入题单

上一题 下一题 算法标签: