結果
| 問題 |
No.2666 Decreasing Modulo Nim
|
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2024-03-08 22:21:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 335 bytes |
| コンパイル時間 | 308 ms |
| コンパイル使用メモリ | 82,980 KB |
| 実行使用メモリ | 131,336 KB |
| 最終ジャッジ日時 | 2024-09-29 19:52:07 |
| 合計ジャッジ時間 | 6,918 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 44 WA * 11 |
ソースコード
from collections import defaultdict
N,M=map(int,input().split())
A=list(map(int,input().split()))
nim=0
dic=defaultdict(int)
for i in range(N):
nim^=(A[i]//M)
if A[i]%M>0:
dic[A[i]%M]+=1
if nim>0:
print('Alice')
exit(0)
for k in dic.keys():
if dic[k]%2>0:
print('Alice')
exit(0)
print('Bob')
nikoro256