結果
| 問題 | No.1716 Bonus Nim |
| コンテスト | |
| ユーザー |
SidewaysOwl
|
| 提出日時 | 2021-10-23 13:01:56 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 503 ms / 2,000 ms |
| + 592µs | |
| コード長 | 385 bytes |
| 記録 | |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 95,948 KB |
| 実行使用メモリ | 165,320 KB |
| 最終ジャッジ日時 | 2026-09-03 18:27:38 |
| 合計ジャッジ時間 | 10,176 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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