結果

問題 No.2666 Decreasing Modulo Nim
ユーザー titia
提出日時 2024-03-11 01:13:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 499 bytes
コンパイル時間 482 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 32,876 KB
最終ジャッジ日時 2024-09-29 21:48:28
合計ジャッジ時間 6,176 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 40 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

n,m=map(int,input().split())
A=list(map(int,input().split()))

XOR=0
for a in A:
    XOR^=(a%m)

if XOR==0:
    print("Bob")
else:
    print("Alice")
"""
x=m-1

def win(A,x):
    flag=0

    for i in range(n):
        for k in range(1,A[i]+1):
            if k%m<=x:
                flag=1
                B=A[:]
                B[i]-=k

                if win(B,k%m)==False:
                    return True

    return False

print(XOR,win(A,x))
        
"""
0