結果
問題 |
No.1716 Bonus Nim
|
ユーザー |
![]() |
提出日時 | 2021-10-22 23:07:06 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 436 bytes |
コンパイル時間 | 191 ms |
コンパイル使用メモリ | 82,104 KB |
実行使用メモリ | 147,432 KB |
最終ジャッジ日時 | 2024-09-23 07:03:01 |
合計ジャッジ時間 | 6,335 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 WA * 21 |
ソースコード
from collections import defaultdict t = int(input()) for _ in range(t): n = int(input()) a = list(map(int,input().split())) if n & 1: print("Alice") else: d = defaultdict(int) for i in range(n): d[a[i]] += 1 ki = 0 for k in d.keys(): if d[k] & 1: ki += 1 if ki == 2: print("Alice") else: print("Bob")