結果

問題 No.1716 Bonus Nim
ユーザー HydruHydru
提出日時 2021-10-22 23:59:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 698 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 361 ms
コンパイル使用メモリ 81,772 KB
実行使用メモリ 150,140 KB
最終ジャッジ日時 2023-10-24 16:19:57
合計ジャッジ時間 6,254 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,556 KB
testcase_01 AC 39 ms
55,604 KB
testcase_02 AC 39 ms
53,556 KB
testcase_03 AC 39 ms
53,560 KB
testcase_04 AC 186 ms
126,376 KB
testcase_05 AC 210 ms
130,012 KB
testcase_06 AC 174 ms
134,080 KB
testcase_07 AC 186 ms
130,136 KB
testcase_08 AC 197 ms
127,544 KB
testcase_09 AC 147 ms
127,740 KB
testcase_10 AC 215 ms
146,204 KB
testcase_11 AC 230 ms
127,556 KB
testcase_12 AC 203 ms
127,968 KB
testcase_13 AC 223 ms
147,396 KB
testcase_14 AC 207 ms
127,536 KB
testcase_15 AC 698 ms
77,468 KB
testcase_16 AC 38 ms
53,556 KB
testcase_17 AC 39 ms
55,604 KB
testcase_18 AC 37 ms
55,604 KB
testcase_19 AC 39 ms
55,604 KB
testcase_20 AC 40 ms
55,604 KB
testcase_21 AC 40 ms
55,604 KB
testcase_22 AC 209 ms
145,776 KB
testcase_23 AC 139 ms
119,336 KB
testcase_24 AC 190 ms
150,140 KB
testcase_25 AC 179 ms
140,040 KB
testcase_26 AC 201 ms
142,848 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")
        continue
    cntA=Counter(A)
    flag=1
    for x in cntA:
        if cntA[x]%2==1:
            flag=0
            break
    if flag:
        print("Bob")
    else:
        print("Alice")
0