atcoder#ARC137C. [ARC137C] Distinct Numbers
[ARC137C] Distinct Numbers
Score : points
Problem Statement
You are given a non-negative integer sequence of length : . Here, all elements of are pairwise distinct.
Alice and Bob will play a game. They will alternately play a turn, with Alice going first. In each turn, the player does the operation below.
- Choose the largest element in at the moment, and replace it with a smaller non-negative integer. Here, all elements in must still be pairwise distinct after this operation.
The first player to be unable to do the operation loses. Determine the winner when both players play optimally.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
If Alice wins, print Alice
; if Bob wins, print Bob
.
2
2 4
Alice
In Alice's first turn, she may replace with , , or . If she replaces with or , Bob's move in the next turn will make Alice unable to do the operation and lose. On the other hand, if she replaces with , she can win regardless of Bob's subsequent moves. Thus, Alice wins in this input.
3
0 1 2
Bob