結果
| 問題 |
No.1716 Bonus Nim
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-24 22:52:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 295 bytes |
| コンパイル時間 | 210 ms |
| コンパイル使用メモリ | 81,976 KB |
| 実行使用メモリ | 133,716 KB |
| 最終ジャッジ日時 | 2024-09-23 03:49:42 |
| 合計ジャッジ時間 | 5,259 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")