#P11072. Alice and Bob
Alice and Bob
Problem Description
Alice and Bob are playing a game together.
At the beginning, you are given an integer sequence with values in the range from to . Then they take turns performing the following operation, with Alice moving first.
- Operation: arbitrarily rearrange .
If, before a player's move, , then that player loses immediately, because they cannot make a move.
If, after some move, a player has two of their own moves such that after those moves the resulting values are the same, then that player loses immediately.
Now you are given a non-negative integer sequence . Assuming both players are smart enough, determine who has a winning strategy.
Input Format
This problem has multiple test cases.
The first line contains a positive integer , the number of test cases.
Then follow test cases. For each test case, the first line contains a positive integer , and the second line contains non-negative integers .
Output Format
For each test case, output one line with a string Alice or Bob, indicating that the first player wins or the second player wins, respectively.
4
2
2 1
2
2 0
3
1 2 3
3
0 1 1
Bob
Alice
Bob
Bob
Hint
| Test point ID | Special property | |
|---|---|---|
| None | ||
| All are the same | ||
| All are pairwise distinct |
For all testdata, it is guaranteed that , .
Translated by ChatGPT 5