結果
| 問題 | No.2666 Decreasing Modulo Nim |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-09 00:05:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 455 bytes |
| コンパイル時間 | 350 ms |
| コンパイル使用メモリ | 82,172 KB |
| 実行使用メモリ | 105,856 KB |
| 最終ジャッジ日時 | 2024-09-29 21:00:08 |
| 合計ジャッジ時間 | 5,911 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 WA * 23 |
ソースコード
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-1)[2:]
x = bin(X)[2:]
if len(b)>len(x):
print("Alice")
elif len(b)==len(x):
if int(b, 2)>=int(x, 2) and x.count("1")>0:
print("Alice")
else:
print("Bob")
else:
if int(b, 2)>=int(x[-len(b):], 2) and x[-len(b):].count("1")>0:
print("Alice")
else:
print("Bob")