結果
| 問題 | No.1716 Bonus Nim |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-24 22:52:48 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 295 bytes |
| 記録 | |
| コンパイル時間 | 137 ms |
| コンパイル使用メモリ | 85,276 KB |
| 実行使用メモリ | 137,040 KB |
| 最終ジャッジ日時 | 2026-04-11 09:07:14 |
| 合計ジャッジ時間 | 4,061 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / 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")