結果
| 問題 |
No.2059 Odd Move Nim
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 21:01:20 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 304 bytes |
| コンパイル時間 | 191 ms |
| コンパイル使用メモリ | 82,372 KB |
| 実行使用メモリ | 102,612 KB |
| 最終ジャッジ日時 | 2025-04-15 21:06:34 |
| 合計ジャッジ時間 | 2,825 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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