結果

問題 No.2813 Cookie
ユーザー PNJ
提出日時 2024-07-19 22:57:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 82,300 KB
実行使用メモリ 77,528 KB
最終ジャッジ日時 2024-07-19 22:57:56
合計ジャッジ時間 4,169 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
Alice = 'Alice'
Bob = 'Bob'

def grundy(x):
  if x == 1:
    return 1
  return (x & 1) + 1

for _ in range(T):
  N = int(input())
  A = list(map(int,input().split()))
  g = 0
  for a in A:
    g ^= grundy(a)
  if g > 0:
    print(Alice)
  else:
    print(Bob)
0