結果

問題 No.2813 Cookie
ユーザー rlangevinrlangevin
提出日時 2024-07-19 22:14:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 459 bytes
コンパイル時間 595 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 76,672 KB
最終ジャッジ日時 2024-07-19 22:14:20
合計ジャッジ時間 4,343 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,968 KB
testcase_01 AC 90 ms
76,544 KB
testcase_02 AC 92 ms
76,288 KB
testcase_03 AC 91 ms
76,160 KB
testcase_04 AC 94 ms
76,160 KB
testcase_05 AC 99 ms
76,160 KB
testcase_06 AC 93 ms
76,160 KB
testcase_07 AC 94 ms
76,160 KB
testcase_08 AC 95 ms
76,160 KB
testcase_09 AC 96 ms
76,288 KB
testcase_10 AC 100 ms
76,544 KB
testcase_11 AC 84 ms
76,288 KB
testcase_12 AC 81 ms
76,032 KB
testcase_13 AC 81 ms
75,776 KB
testcase_14 AC 80 ms
75,648 KB
testcase_15 AC 84 ms
76,288 KB
testcase_16 AC 83 ms
76,160 KB
testcase_17 AC 80 ms
76,672 KB
testcase_18 AC 80 ms
75,776 KB
testcase_19 AC 80 ms
76,416 KB
testcase_20 AC 88 ms
76,032 KB
testcase_21 AC 85 ms
76,416 KB
testcase_22 AC 75 ms
75,776 KB
testcase_23 AC 82 ms
75,776 KB
testcase_24 AC 76 ms
75,904 KB
testcase_25 AC 78 ms
76,288 KB
testcase_26 AC 41 ms
51,840 KB
testcase_27 AC 41 ms
52,224 KB
testcase_28 AC 41 ms
51,840 KB
testcase_29 AC 42 ms
52,096 KB
testcase_30 AC 41 ms
51,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

T = int(input())
temp = [0, 1, 1, 2, 2, 4, 4, 6, 8, 8, 10]
for _ in range(T):
    N = int(input())
    A = list(map(int, input().split()))
    v = 0
    for a in A:
        if a <= 10:
            v ^= temp[a]
        else:
            a -= 10
            val = 10 + a // 3 * 4
            r = a % 3
            if r == 1 or r == 2:
                val += 2
            v ^= val
    print("Alice") if v else print("Bob")
0