結果

問題 No.2666 Decreasing Modulo Nim
ユーザー minimumminimum
提出日時 2024-03-08 22:03:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 108,596 KB
最終ジャッジ日時 2024-03-08 22:03:09
合計ジャッジ時間 6,701 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,460 KB
testcase_01 AC 39 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 48 ms
66,924 KB
testcase_04 AC 91 ms
106,984 KB
testcase_05 AC 99 ms
101,452 KB
testcase_06 AC 46 ms
64,544 KB
testcase_07 AC 76 ms
96,760 KB
testcase_08 AC 55 ms
74,268 KB
testcase_09 AC 90 ms
106,900 KB
testcase_10 AC 76 ms
96,592 KB
testcase_11 AC 54 ms
73,156 KB
testcase_12 AC 49 ms
68,260 KB
testcase_13 AC 60 ms
80,508 KB
testcase_14 AC 51 ms
72,024 KB
testcase_15 AC 103 ms
100,904 KB
testcase_16 AC 50 ms
69,080 KB
testcase_17 AC 60 ms
80,796 KB
testcase_18 AC 70 ms
91,776 KB
testcase_19 AC 64 ms
84,512 KB
testcase_20 AC 62 ms
82,604 KB
testcase_21 AC 90 ms
106,808 KB
testcase_22 AC 50 ms
70,416 KB
testcase_23 AC 50 ms
70,360 KB
testcase_24 AC 53 ms
72,076 KB
testcase_25 AC 56 ms
74,292 KB
testcase_26 AC 76 ms
96,744 KB
testcase_27 AC 67 ms
86,988 KB
testcase_28 AC 92 ms
106,648 KB
testcase_29 AC 77 ms
96,856 KB
testcase_30 AC 94 ms
108,596 KB
testcase_31 AC 68 ms
89,052 KB
testcase_32 AC 79 ms
99,684 KB
testcase_33 AC 100 ms
101,496 KB
testcase_34 AC 48 ms
66,436 KB
testcase_35 AC 86 ms
105,444 KB
testcase_36 AC 73 ms
93,956 KB
testcase_37 AC 84 ms
104,796 KB
testcase_38 AC 93 ms
107,224 KB
testcase_39 AC 48 ms
66,432 KB
testcase_40 AC 77 ms
96,868 KB
testcase_41 AC 68 ms
89,156 KB
testcase_42 AC 69 ms
89,212 KB
testcase_43 AC 36 ms
53,460 KB
testcase_44 AC 37 ms
53,460 KB
testcase_45 AC 102 ms
101,740 KB
testcase_46 AC 102 ms
101,740 KB
testcase_47 AC 101 ms
101,744 KB
testcase_48 AC 101 ms
101,744 KB
testcase_49 AC 102 ms
101,748 KB
testcase_50 AC 103 ms
101,740 KB
testcase_51 AC 101 ms
101,736 KB
testcase_52 AC 102 ms
101,740 KB
testcase_53 AC 103 ms
102,000 KB
testcase_54 AC 103 ms
102,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = list(map(int, input().split()))

X = [A[i] // M for i in range(N)]
Y = [A[i] % M for i in range(N)]

xor_x = 0
for i in X:
    xor_x ^= i
if xor_x != 0:
    exit(print("Alice"))

xor_y = 0
for i in Y:
    xor_y ^= i
if xor_y == 0:
    exit(print("Bob"))
k = 1
while xor_y % (2 * k) == 0:
    k *= 2

if k <= M:
    print("Alice")
else:
    print("Bob")
0