結果
| 問題 |
No.1716 Bonus Nim
|
| コンテスト | |
| ユーザー |
SidewaysOwl
|
| 提出日時 | 2021-10-23 13:01:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 685 ms / 2,000 ms |
| コード長 | 385 bytes |
| コンパイル時間 | 313 ms |
| コンパイル使用メモリ | 81,720 KB |
| 実行使用メモリ | 147,040 KB |
| 最終ジャッジ日時 | 2024-09-25 04:02:55 |
| 合計ジャッジ時間 | 6,662 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 26 |
ソースコード
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
ans = "Bob"
for k in d.keys():
if d[k] % 2 != 0:
ans = "Alice"
print(ans)
SidewaysOwl