#K1171. Alice and Bob's Game
Alice and Bob's Game
Alice and Bob's Game
Alice and Bob are playing a turn-based game with an array of N non-negative integers. In each move, a player may remove exactly one unit from any element of the array (provided that the element is greater than 0). The players take turns, and Alice always starts first.
The total number of moves possible is equal to the sum of all numbers in the array, i.e. \(S = \sum_{i=1}^{N} a_i\). If the total \(S\) is odd, then Alice gets the last move, and she wins. Otherwise, Bob wins.
Your task is to determine the winner based on the initial configuration of the array.
inputFormat
The first line contains an integer N (\(1 \leq N \leq 10^5\)) representing the number of elements in the array.
The second line contains N space-separated non-negative integers \(a_1, a_2, \ldots, a_N\) (each \(0 \leq a_i \leq 10^9\)).
Input is provided via standard input (stdin).
outputFormat
Output a single line containing either Alice
or Bob
, indicating the winner of the game based on optimal play.
Output the result via standard output (stdout).
## sample3
1 2 3
Bob