結果
| 問題 | No.2666 Decreasing Modulo Nim |
| コンテスト | |
| ユーザー |
hongrock
|
| 提出日時 | 2024-03-08 22:05:29 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 730 bytes |
| 記録 | |
| コンパイル時間 | 1,276 ms |
| コンパイル使用メモリ | 213,180 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-04 00:44:41 |
| 合計ジャッジ時間 | 3,864 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 44 WA * 11 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define pb emplace_back
#define mp make_pair
using ll = long long;
using pii = pair<int,int>;
constexpr int mod = 998244353;
constexpr int inf = 0x3f3f3f3f;
constexpr int N = 2e5 + 10;
int n, m, a[N];
bool ok(){
if(m <= 2){
int s1 = 0, s2 = 0;
for(int i=1; i<=n; ++i){
s1 ^= a[i];
s2 ^= (a[i] / m);
}
return s1 > 0 || s2 > 0;
}
sort(a + 1, a + 1 + n);
if(a[1] == a[n]){
return n & 1;
}
return 1;
}
void _main(){
cin >> n >> m;
for(int i=1; i<=n; ++i) cin >> a[i];
if(ok()){
cout << "Alice\n";
} else {
cout << "Bob\n";
}
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
_main();
return 0;
}
hongrock