結果
| 問題 |
No.2059 Odd Move Nim
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-16 15:24:36 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 304 bytes |
| コンパイル時間 | 721 ms |
| コンパイル使用メモリ | 81,888 KB |
| 実行使用メモリ | 102,560 KB |
| 最終ジャッジ日時 | 2025-04-16 15:25:11 |
| 合計ジャッジ時間 | 3,653 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 9 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
even_xor = 0
odd_xor = 0
for i in range(1, n):
if (i + 1) % 2 == 0: # since a[0] is pile 1, i=0 corresponds to pile 1
even_xor ^= a[i]
else:
odd_xor ^= a[i]
total = even_xor ^ odd_xor
print("Alice" if total != 0 else "Bob")
lam6er