AtCoder Regular Contest 137
翻译中…
Problem Statement
翻译中…
You are given a non-negative integer sequence of length $N$: $A=(A_1,A_2,\cdots,A_N)$. Here, all elements of $A$ 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
$A$at the moment, and replace it with a smaller non-negative integer. Here, all elements in$A$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
翻译中…
$2 \leq N \leq 3 \times 10^5$$0 \leq A_1 < A_2 < \cdots < A_N \leq 10^9$- All values in input are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
A_1 A_2 \cdots A_N
翻译中…
Output
翻译中…
If Alice wins, print Alice; if Bob wins, print Bob.
翻译中…
样例
Input #1
2
2 4
Output #1
Alice
In Alice's first turn, she may replace $4$ with $0$, $1$, or $3$. If she replaces $4$ with $0$ or $1$, Bob's move in the next turn will make Alice unable to do the operation and lose. On the other hand, if she replaces $4$ with $3$, she can win regardless of Bob's subsequent moves. Thus, Alice wins in this input.
Input #2
3
0 1 2
Output #2
Bob
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。