結果

問題 No.2666 Decreasing Modulo Nim
ユーザー PNJPNJ
提出日時 2024-03-08 22:30:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 327 ms / 2,000 ms
コード長 363 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 258,240 KB
最終ジャッジ日時 2024-03-08 22:30:17
合計ジャッジ時間 7,879 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 36 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 85 ms
100,020 KB
testcase_04 AC 297 ms
258,152 KB
testcase_05 AC 267 ms
257,860 KB
testcase_06 AC 59 ms
76,148 KB
testcase_07 AC 214 ms
233,064 KB
testcase_08 AC 89 ms
103,368 KB
testcase_09 AC 174 ms
185,956 KB
testcase_10 AC 121 ms
120,512 KB
testcase_11 AC 64 ms
85,784 KB
testcase_12 AC 47 ms
67,748 KB
testcase_13 AC 58 ms
79,856 KB
testcase_14 AC 50 ms
69,520 KB
testcase_15 AC 77 ms
99,112 KB
testcase_16 AC 49 ms
68,568 KB
testcase_17 AC 59 ms
80,028 KB
testcase_18 AC 69 ms
90,624 KB
testcase_19 AC 63 ms
83,616 KB
testcase_20 AC 60 ms
81,708 KB
testcase_21 AC 89 ms
105,528 KB
testcase_22 AC 51 ms
70,432 KB
testcase_23 AC 50 ms
68,276 KB
testcase_24 AC 59 ms
78,920 KB
testcase_25 AC 55 ms
74,420 KB
testcase_26 AC 76 ms
96,744 KB
testcase_27 AC 67 ms
86,976 KB
testcase_28 AC 91 ms
105,496 KB
testcase_29 AC 77 ms
96,856 KB
testcase_30 AC 90 ms
108,596 KB
testcase_31 AC 66 ms
88,028 KB
testcase_32 AC 76 ms
98,404 KB
testcase_33 AC 98 ms
101,412 KB
testcase_34 AC 46 ms
66,048 KB
testcase_35 AC 82 ms
103,524 KB
testcase_36 AC 69 ms
90,696 KB
testcase_37 AC 82 ms
103,004 KB
testcase_38 AC 91 ms
107,224 KB
testcase_39 AC 48 ms
66,412 KB
testcase_40 AC 77 ms
96,868 KB
testcase_41 AC 67 ms
88,260 KB
testcase_42 AC 67 ms
88,316 KB
testcase_43 AC 37 ms
53,460 KB
testcase_44 AC 37 ms
53,460 KB
testcase_45 AC 327 ms
258,152 KB
testcase_46 AC 254 ms
257,388 KB
testcase_47 AC 96 ms
101,616 KB
testcase_48 AC 96 ms
101,604 KB
testcase_49 AC 115 ms
116,848 KB
testcase_50 AC 101 ms
101,740 KB
testcase_51 AC 97 ms
101,616 KB
testcase_52 AC 97 ms
101,604 KB
testcase_53 AC 295 ms
258,240 KB
testcase_54 AC 97 ms
102,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
A = list(map(int,input().split()))
B = [A[i]//m for i in range(n)]
g = 0
for b in B:
  g ^= b
if g > 0:
  print('Alice')
  exit()


R = [A[i] % m for i in range(n)]
while True:
  if sum(R) == 0:
    print('Bob')
    exit()
  if sum(R) % 2 == 1:
    print('Alice')
    exit()
  RR = []
  for r in R:
    RR.append(r // 2)
  R = RR[:]
0