結果
| 問題 |
No.2059 Odd Move Nim
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-31 17:18:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 333 bytes |
| コンパイル時間 | 350 ms |
| コンパイル使用メモリ | 82,088 KB |
| 実行使用メモリ | 115,916 KB |
| 最終ジャッジ日時 | 2025-03-31 17:19:34 |
| 合計ジャッジ時間 | 2,987 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 9 |
ソースコード
n, *rest = map(int, open(0).read().split())
A = rest[:n]
even_xor = 0
odd_xor = 0
for i in range(1, n):
# pile i+1 is index i in the list (since A_1 is first)
pile = i + 1
if pile % 2 == 0:
even_xor ^= A[i]
else:
odd_xor ^= A[i]
if even_xor ^ odd_xor != 0:
print("Alice")
else:
print("Bob")
lam6er