結果

問題 No.2813 Cookie
コンテスト
ユーザー rin204
提出日時 2024-07-19 21:40:54
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 402 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 235 ms
コンパイル使用メモリ 95,984 KB
実行使用メモリ 85,676 KB
最終ジャッジ日時 2026-08-19 02:10:22
合計ジャッジ時間 5,672 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def solve():
    n = int(input())
    A = list(map(int, input().split()))
    x = 0
    for a in A:
        if a <= 2:
            x ^= 1
        elif a <= 4:
            x ^= 2
        else:
            c = (a - 5) // 3
            y = 2 * (c + 2)
            if c % 2 == 0:
                y += 1
            x ^= y
    print("Bob" if x == 0 else "Alice")


for _ in range(int(input())):
    solve()
0