結果

問題 No.2666 Decreasing Modulo Nim
ユーザー cho435
提出日時 2024-03-09 00:09:57
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 3,559 ms
コンパイル使用メモリ 250,100 KB
最終ジャッジ日時 2025-02-20 03:18:03
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 55
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using mint = atcoder::modint998244353;

int main(){
	int n,m;
	cin>>n>>m;
	vector<int> a(n);
	rep(i,n) cin>>a.at(i);
	int tmp1=0,tmp2=0;
	rep(i,n) tmp1^=a.at(i)%m;
	rep(i,n) tmp2^=(a.at(i)/m);
	if(tmp1==0&&tmp2==0){
		cout<<"Bob\n";
	}else{
		cout<<"Alice\n";
	}
}
0