結果
| 問題 |
No.2666 Decreasing Modulo Nim
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-09 00:09:46 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 86 ms / 2,000 ms |
| コード長 | 343 bytes |
| コンパイル時間 | 2,736 ms |
| コンパイル使用メモリ | 246,356 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-09-29 21:00:16 |
| 合計ジャッジ時間 | 7,128 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 55 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
int n,m;
cin>>n>>m;
vector<int> a(n);
for(int i=0;i<n;i++)cin>>a[i];
int x=0;
for(int i=0;i<n;i++)x^=a[i]/m;
if(x)cout<<"Alice"<<endl,exit(0);
for(int i=0;i<n;i++)a[i]%=m;
for(int i=0;i<n;i++)x^=a[i];
if(x)cout<<"Alice"<<endl;
else cout<<"Bob"<<endl;
}