結果

問題 No.2666 Decreasing Modulo Nim
ユーザー suisen
提出日時 2023-12-29 18:03:47
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 687 ms
コンパイル使用メモリ 65,960 KB
最終ジャッジ日時 2025-02-18 15:17:44
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 55
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int n, m;
    std::cin >> n >> m;
    int xb = 0, xc = 0;
    for (int i = 0; i < n; ++i) {
        int v;
        std::cin >> v;
        xb ^= v / m;
        xc ^= v % m;
    }
    std::cout << ((xb or xc) ? "Alice" : "Bob") << std::endl;
}
0