結果

問題 No.1716 Bonus Nim
ユーザー mahiro72mahiro72
提出日時 2021-10-23 02:37:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,835 ms / 2,000 ms
コード長 322 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 11,792 KB
実行使用メモリ 45,388 KB
最終ジャッジ日時 2023-10-24 19:22:12
合計ジャッジ時間 7,563 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,080 KB
testcase_01 AC 26 ms
10,080 KB
testcase_02 AC 26 ms
10,084 KB
testcase_03 AC 26 ms
10,080 KB
testcase_04 AC 216 ms
28,308 KB
testcase_05 AC 239 ms
34,868 KB
testcase_06 AC 196 ms
29,748 KB
testcase_07 AC 216 ms
30,388 KB
testcase_08 AC 221 ms
34,500 KB
testcase_09 AC 165 ms
30,424 KB
testcase_10 AC 245 ms
38,912 KB
testcase_11 AC 246 ms
27,180 KB
testcase_12 AC 238 ms
29,872 KB
testcase_13 AC 256 ms
45,132 KB
testcase_14 AC 236 ms
32,832 KB
testcase_15 AC 1,835 ms
10,100 KB
testcase_16 AC 28 ms
10,080 KB
testcase_17 AC 27 ms
10,080 KB
testcase_18 AC 26 ms
10,084 KB
testcase_19 AC 26 ms
10,080 KB
testcase_20 AC 27 ms
10,084 KB
testcase_21 AC 26 ms
10,084 KB
testcase_22 AC 219 ms
43,488 KB
testcase_23 AC 152 ms
32,112 KB
testcase_24 AC 182 ms
39,816 KB
testcase_25 AC 178 ms
43,884 KB
testcase_26 AC 215 ms
45,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
T = int(input())
for _ in range(T):
    N = int(input())
    A = list(map(int,input().split()))
    if N%2==1:
        print('Alice')
    else:
        c = Counter(A)
        odd = False
        for v in c.values():
            if v%2:odd=True;break
        print('Alice'if odd else 'Bob')
0