結果
問題 |
No.1716 Bonus Nim
|
ユーザー |
![]() |
提出日時 | 2021-11-15 23:13:09 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 600 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 67,572 KB |
最終ジャッジ日時 | 2024-12-15 07:57:15 |
合計ジャッジ時間 | 10,791 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 12 WA * 14 |
ソースコード
from sys import stdin t, *indata = map(int, stdin.read().split()) offset = 0 for _ in range(t): n = indata[offset] offset += 1 if n % 2 == 1: print("Alice") offset += n continue d = dict() appear = set() for i in range(n): a = indata[offset+i] if a in appear: d[a] += 1 else: d[a] = 1 appear.add(a) offset += n check = True for i in appear: if d[a] % 2 == 1: check = False break if check: print("Bob") else: print("Alice")