結果

問題 No.2666 Decreasing Modulo Nim
ユーザー nikoro256nikoro256
提出日時 2024-03-08 22:36:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 449 bytes
コンパイル時間 690 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 130,536 KB
最終ジャッジ日時 2024-03-08 22:36:13
合計ジャッジ時間 8,268 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,460 KB
testcase_01 AC 38 ms
53,460 KB
testcase_02 AC 39 ms
53,460 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 57 ms
74,588 KB
testcase_12 AC 57 ms
75,844 KB
testcase_13 AC 79 ms
94,984 KB
testcase_14 AC 64 ms
78,832 KB
testcase_15 AC 119 ms
101,004 KB
testcase_16 AC 57 ms
72,880 KB
testcase_17 AC 69 ms
84,056 KB
testcase_18 AC 89 ms
95,252 KB
testcase_19 AC 71 ms
87,332 KB
testcase_20 AC 70 ms
85,676 KB
testcase_21 AC 138 ms
124,508 KB
testcase_22 AC 60 ms
75,908 KB
testcase_23 AC 59 ms
75,864 KB
testcase_24 AC 65 ms
81,064 KB
testcase_25 AC 66 ms
81,736 KB
testcase_26 AC 87 ms
97,884 KB
testcase_27 AC 75 ms
88,644 KB
testcase_28 AC 98 ms
99,184 KB
testcase_29 AC 86 ms
98,108 KB
testcase_30 AC 149 ms
129,832 KB
testcase_31 AC 94 ms
107,372 KB
testcase_32 AC 113 ms
100,780 KB
testcase_33 AC 136 ms
119,500 KB
testcase_34 AC 54 ms
71,744 KB
testcase_35 AC 103 ms
98,748 KB
testcase_36 AC 81 ms
95,324 KB
testcase_37 AC 97 ms
98,336 KB
testcase_38 AC 102 ms
99,380 KB
testcase_39 AC 50 ms
68,000 KB
testcase_40 AC 75 ms
95,048 KB
testcase_41 AC 67 ms
89,444 KB
testcase_42 AC 70 ms
89,504 KB
testcase_43 AC 39 ms
53,460 KB
testcase_44 AC 38 ms
53,460 KB
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 146 ms
130,412 KB
testcase_48 AC 130 ms
111,824 KB
testcase_49 AC 151 ms
130,536 KB
testcase_50 AC 119 ms
103,124 KB
testcase_51 AC 149 ms
130,404 KB
testcase_52 AC 118 ms
102,104 KB
testcase_53 AC 105 ms
101,112 KB
testcase_54 AC 103 ms
100,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
N,M=map(int,input().split())
A=list(map(int,input().split()))
nim=0
dic=defaultdict(int)
div=0
for i in range(N):
    nim^=(A[i]//M)
    if A[i]%M>0:
        dic[A[i]%M]+=1
        div+=A[i]%M
if nim>0:
    print('Alice')
    exit(0)
#和を奇数にしたら勝ち。
if div%2==1:
    print('Alice')
    exit(0)
nim2=0
for i in range(N):
    nim2^=(A[i]//2)
if nim2>0:
    print('Alice')
    exit(0)
print('Bob')
0