結果

問題 No.2666 Decreasing Modulo Nim
ユーザー miya145592miya145592
提出日時 2024-03-08 23:22:50
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 355 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 105,644 KB
最終ジャッジ日時 2024-03-08 23:22:57
合計ジャッジ時間 6,918 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 36 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 45 ms
66,028 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 49 ms
69,628 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 78 ms
100,332 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 AC 70 ms
93,104 KB
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 AC 45 ms
65,676 KB
testcase_40 AC 70 ms
93,196 KB
testcase_41 RE -
testcase_42 RE -
testcase_43 AC 36 ms
53,460 KB
testcase_44 AC 37 ms
53,460 KB
testcase_45 WA -
testcase_46 RE -
testcase_47 AC 93 ms
99,800 KB
testcase_48 RE -
testcase_49 WA -
testcase_50 RE -
testcase_51 RE -
testcase_52 RE -
testcase_53 AC 94 ms
99,840 KB
testcase_54 AC 94 ms
99,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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")
0