結果
| 問題 |
No.1716 Bonus Nim
|
| コンテスト | |
| ユーザー |
tamato
|
| 提出日時 | 2021-10-22 21:35:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 457 bytes |
| コンパイル時間 | 319 ms |
| コンパイル使用メモリ | 82,288 KB |
| 実行使用メモリ | 132,080 KB |
| 最終ジャッジ日時 | 2024-09-23 04:52:12 |
| 合計ジャッジ時間 | 4,569 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 23 WA * 3 |
ソースコード
mod = 1000000007
eps = 10**-9
def main():
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:
g = 0
for a in A:
g ^= a-1
if g:
print("Alice")
else:
print("Bob")
if __name__ == '__main__':
main()
tamato