結果

問題 No.1716 Bonus Nim
ユーザー zkouzkou
提出日時 2021-09-25 12:00:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 736 ms / 2,000 ms
コード長 436 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 81,764 KB
実行使用メモリ 150,028 KB
最終ジャッジ日時 2023-10-24 11:29:35
合計ジャッジ時間 6,028 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,504 KB
testcase_01 AC 42 ms
55,552 KB
testcase_02 AC 39 ms
53,504 KB
testcase_03 AC 36 ms
53,504 KB
testcase_04 AC 176 ms
126,920 KB
testcase_05 AC 194 ms
133,480 KB
testcase_06 AC 170 ms
133,792 KB
testcase_07 AC 181 ms
129,904 KB
testcase_08 AC 191 ms
127,976 KB
testcase_09 AC 152 ms
127,680 KB
testcase_10 AC 207 ms
146,584 KB
testcase_11 AC 197 ms
127,528 KB
testcase_12 AC 194 ms
127,916 KB
testcase_13 AC 230 ms
147,332 KB
testcase_14 AC 199 ms
128,580 KB
testcase_15 AC 736 ms
77,420 KB
testcase_16 AC 39 ms
53,508 KB
testcase_17 AC 37 ms
55,556 KB
testcase_18 AC 37 ms
55,556 KB
testcase_19 AC 37 ms
55,556 KB
testcase_20 AC 37 ms
55,556 KB
testcase_21 AC 38 ms
55,556 KB
testcase_22 AC 209 ms
145,720 KB
testcase_23 AC 139 ms
119,332 KB
testcase_24 AC 182 ms
150,028 KB
testcase_25 AC 175 ms
140,032 KB
testcase_26 AC 203 ms
140,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

T = int(input())
for _ in range(T):
    N = int(input())
    As = list(map(int, input().split()))
    if N % 2 == 1:
        print("Alice")
    else:
        nim = 0
        cnter = Counter(As)
        odd = False
        for val in cnter.values():
            if val % 2:
                odd = True
                break
        if odd:
            print("Alice")
        else:
            print("Bob")
0