

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
黒板に 個の整数 が書かれています。また、 以上の整数 があります。
Alice と Bob はゲームをします。
ゲームは Alice を先攻として、黒板の上の数が全てなくなるまで次の操作を交互に行います。
- 数を 個選び、その数を黒板から消す。
ゲームを終了した時点で、(Alice が消した数の和) と (Bob が消した数の和) が一致していれば Bob の勝ち、そうでない場合は Alice の勝ちです。
両者が最善を尽くしたとき、どちらが勝ちますか?
制約
- 入力される値はすべて整数
入力
入力は以下の形式で標準入力から与えられる。
出力
Alice が勝つ場合は Alice
を、Bob が勝つ場合は Bob
を出力せよ。
入力例 1Copy
2 9 1 4 8 5
出力例 1Copy
Alice
ゲームの進行例として次のようなものが考えられます。
- Alice が を消す。
- Bob が を消す。
- Alice が を消す。
- Bob が を消す。
このように進んだ場合、(Alice が消した数の和) は , (Bob が消した数の和) は で、 なので Alice の勝ちです。
入力例 2Copy
3 998244353 1 2 3 1 2 3
出力例 2Copy
Bob
Score : points
Problem Statement
There are integers written on a blackboard, and an integer at least .
Alice and Bob will play a game.
They will alternately perform the following operation, with Alice going first, until there is no number on the blackboard.
- Choose a number and delete it from the blackboard.
At the end of the game, if the sum of numbers deleted by Alice modulo equals the sum of numbers deleted by Bob modulo , Bob wins; otherwise, Alice wins.
Which player will win if both plays optimally?
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
If Alice wins, print Alice
; if Bob wins, print Bob
.
Sample Input 1Copy
2 9 1 4 8 5
Sample Output 1Copy
Alice
The game may proceed as follows.
- Alice deletes .
- Bob deletes .
- Alice deletes .
- Bob deletes .
In this case, the sum of numbers deleted by Alice modulo is , and the sum of numbers deleted by Bob modulo is . Since , Alice wins.
Sample Input 2Copy
3 998244353 1 2 3 1 2 3
Sample Output 2Copy
Bob