結果

問題 No.3752 No Use Crying Over Suffixes
コンテスト
ユーザー Kude
提出日時 2026-10-02 22:07:57
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 277 ms / 2,000 ms
+ 53µs
コード長 404 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 389 ms
コンパイル使用メモリ 81,020 KB
実行使用メモリ 88,124 KB
最終ジャッジ日時 2026-10-02 22:08:06
合計ジャッジ時間 6,031 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

for _ in range(int(input())):
    n = int(input())
    a = list(map(int, input().split()))
    now = 0
    ans = False
    for x in a:
        if x == 1:
            if now == 0:
                ans = True
                break
            now ^= x % 2
        elif now == 0:
            now ^= x % 2
        else:
            now ^= x % 2
    else:
        ans = now
    print('Alice' if ans else 'Bob')
0