結果

問題 No.1716 Bonus Nim
ユーザー puznekopuzneko
提出日時 2021-11-15 23:13:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 65,184 KB
最終ジャッジ日時 2023-08-21 18:16:58
合計ジャッジ時間 11,612 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,720 KB
testcase_01 WA -
testcase_02 AC 16 ms
7,868 KB
testcase_03 AC 15 ms
7,868 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 462 ms
30,320 KB
testcase_16 AC 15 ms
7,712 KB
testcase_17 AC 15 ms
7,872 KB
testcase_18 AC 16 ms
7,792 KB
testcase_19 AC 15 ms
7,800 KB
testcase_20 AC 16 ms
7,872 KB
testcase_21 AC 15 ms
7,756 KB
testcase_22 WA -
testcase_23 AC 173 ms
62,824 KB
testcase_24 WA -
testcase_25 AC 279 ms
63,152 KB
testcase_26 AC 401 ms
65,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin

t, *indata = map(int, stdin.read().split())
offset = 0
for _ in range(t):
    n = indata[offset]
    offset += 1
    if n % 2 == 1:
        print("Alice")
        offset += n
        continue
    d = dict()
    appear = set()
    for i in range(n):
        a = indata[offset+i]
        if a in appear:
            d[a] += 1
        else:
            d[a] = 1
            appear.add(a)
    offset += n
    check = True
    for i in appear:
        if d[a] % 2 == 1:
            check = False
            break
    if check:
        print("Bob")
    else:
        print("Alice")
0