結果
| 問題 | No.2666 Decreasing Modulo Nim |
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2024-03-08 22:21:29 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 335 bytes |
| 記録 | |
| コンパイル時間 | 247 ms |
| コンパイル使用メモリ | 95,672 KB |
| 実行使用メモリ | 144,524 KB |
| 最終ジャッジ日時 | 2026-09-06 06:17:17 |
| 合計ジャッジ時間 | 11,127 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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