結果
| 問題 |
No.2813 Cookie
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-19 22:33:06 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 447 bytes |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 77,824 KB |
| 最終ジャッジ日時 | 2024-07-19 22:33:12 |
| 合計ジャッジ時間 | 4,299 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 WA * 25 |
ソースコード
def solve():
N = int(input())
A = list(map(int, input().split()))
grs = []
for i in A:
if i == 1 or i == 2:
grs.append(1)
elif i % 2 == 0:
grs.append(i - 2)
else:
grs.append(i - 1)
# print(b)
c = 0
for i in grs:
c ^= i
if c > 0:
print("Alice")
else:
print("Bob")
# print(c)
T = int(input())
for _ in range(T):
solve()