結果
問題 | No.1716 Bonus Nim |
ユーザー |
|
提出日時 | 2022-03-16 20:35:21 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 688 ms / 2,000 ms |
コード長 | 523 bytes |
コンパイル時間 | 252 ms |
コンパイル使用メモリ | 82,460 KB |
実行使用メモリ | 151,184 KB |
最終ジャッジ日時 | 2024-09-24 23:00:33 |
合計ジャッジ時間 | 5,818 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 26 |
ソースコード
T = int(input())from collections import defaultdictfor _ in range(T):N = int(input())a = list(map(int,input().split()))if N % 2 == 1:print('Alice')continueS = 0for i in a:S ^= iif S != 0:print("Alice")continued = defaultdict(int)for i in a:d[i] += 1flag = Falsefor v in d.values():if v % 2 == 1:print("Alice")flag = Truebreakif flag == False:print("Bob")