結果

問題 No.1716 Bonus Nim
ユーザー 👑 tamatotamato
提出日時 2021-10-22 21:41:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 228 ms / 2,000 ms
コード長 599 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 81,952 KB
実行使用メモリ 148,516 KB
最終ジャッジ日時 2023-10-24 12:41:09
合計ジャッジ時間 5,697 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,704 KB
testcase_01 AC 40 ms
55,736 KB
testcase_02 AC 40 ms
53,688 KB
testcase_03 AC 40 ms
53,688 KB
testcase_04 AC 189 ms
129,316 KB
testcase_05 AC 207 ms
131,216 KB
testcase_06 AC 175 ms
131,044 KB
testcase_07 AC 190 ms
128,496 KB
testcase_08 AC 210 ms
129,912 KB
testcase_09 AC 154 ms
125,452 KB
testcase_10 AC 219 ms
147,024 KB
testcase_11 AC 206 ms
127,196 KB
testcase_12 AC 205 ms
126,292 KB
testcase_13 AC 228 ms
144,796 KB
testcase_14 AC 210 ms
124,388 KB
testcase_15 AC 225 ms
77,408 KB
testcase_16 AC 40 ms
53,688 KB
testcase_17 AC 40 ms
55,736 KB
testcase_18 AC 40 ms
55,736 KB
testcase_19 AC 40 ms
55,736 KB
testcase_20 AC 41 ms
55,736 KB
testcase_21 AC 41 ms
55,736 KB
testcase_22 AC 217 ms
143,892 KB
testcase_23 AC 139 ms
117,072 KB
testcase_24 AC 184 ms
148,516 KB
testcase_25 AC 172 ms
136,824 KB
testcase_26 AC 207 ms
143,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from collections import Counter
    input = sys.stdin.readline

    for _ in range(int(input())):
        N = int(input())
        A = list(map(int, input().split()))

        if N & 1:
            print("Alice")
        else:
            C = Counter(A)
            ok = 0
            for x in C:
                if C[x] & 1:
                    ok = 1
                    break
            if ok:
                print("Alice")
            else:
                print("Bob")
                    

if __name__ == '__main__':
    main()
0