結果
問題 | No.2666 Decreasing Modulo Nim |
ユーザー |
|
提出日時 | 2024-03-09 20:57:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 1,847 ms |
コンパイル使用メモリ | 194,676 KB |
最終ジャッジ日時 | 2025-02-20 03:31:50 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 55 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); int n,m; cin>>n>>m; vector<int> a(n); for (int &ai : a) cin>>ai; int x=0,y=0; for (int ai : a) x^=ai%m,y^=ai/m; if (x+y==0) cout <<"Bob\n"; else cout << "Alice\n"; return 0;}