結果
| 問題 | No.1716 Bonus Nim |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-24 22:52:48 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 295 bytes |
| 記録 | |
| コンパイル時間 | 244 ms |
| コンパイル使用メモリ | 96,084 KB |
| 実行使用メモリ | 142,356 KB |
| 最終ジャッジ日時 | 2026-09-02 22:36:38 |
| 合計ジャッジ時間 | 8,012 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 23 WA * 3 |
ソースコード
T = int(input())
for _ in range(T):
N = int(input())
As = list(map(int, input().split()))
if N % 2 == 1:
print("Alice")
else:
nim = 0
for A in As:
nim ^= (A - 1)
if nim:
print("Alice")
else:
print("Bob")