結果
| 問題 | No.2666 Decreasing Modulo Nim |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-08 23:22:50 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 264 ms |
| コンパイル使用メモリ | 84,468 KB |
| 実行使用メモリ | 112,072 KB |
| 最終ジャッジ日時 | 2026-04-16 03:39:08 |
| 合計ジャッジ時間 | 6,081 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 2 RE * 39 |
ソースコード
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
A = list(map(int, input().split()))
X = 0
for a in A:
X ^= a
b = bin(M)[2:]
x = bin(X)[2:]
if len(b)>=len(x):
if x.count("1")%2==0:
print("Bob")
else:
print("Alice")
else:
if x[-b:].count("1")%2==0:
print("Bob")
else:
print("Alice")