結果
問題 | No.1716 Bonus Nim |
ユーザー |
![]() |
提出日時 | 2021-11-15 23:17:59 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 279 ms / 2,000 ms |
コード長 | 599 bytes |
コンパイル時間 | 401 ms |
コンパイル使用メモリ | 82,140 KB |
実行使用メモリ | 239,276 KB |
最終ジャッジ日時 | 2024-12-15 08:00:51 |
合計ジャッジ時間 | 6,219 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 26 |
ソースコード
from sys import stdint, *indata = map(int, stdin.read().split())offset = 0for _ in range(t):n = indata[offset]offset += 1if n % 2 == 1:print("Alice")offset += ncontinued = dict()appear = set()for i in range(n):a = indata[offset+i]if a in appear:d[a] += 1else:d[a] = 1appear.add(a)offset += ncheck = Truefor i in appear:if d[i] % 2 == 1:check = Falsebreakif check:print("Bob")else:print("Alice")