結果
| 問題 | No.1716 Bonus Nim |
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-10-22 22:48:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 250 bytes |
| コンパイル時間 | 176 ms |
| コンパイル使用メモリ | 82,116 KB |
| 実行使用メモリ | 131,876 KB |
| 最終ジャッジ日時 | 2024-09-23 06:33:21 |
| 合計ジャッジ時間 | 4,534 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 23 WA * 3 |
ソースコード
import sys
input = sys.stdin.readline
for _ in range(int(input())):
N = int(input())
a = list(map(int, input().split()))
if N & 1: print("Alice")
else:
nim = 0
for x in a: nim ^= x - 1
if nim: print("Alice")
else: print("Bob")
wolgnik