結果

問題 No.669 対決!!! 飲み比べ
ユーザー finefine
提出日時 2018-03-23 22:41:48
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 351 bytes
コンパイル時間 1,437 ms
コンパイル使用メモリ 166,264 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-25 02:02:42
合計ジャッジ時間 2,257 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N, K;
    cin >> N >> K;
    K++;
    int ans = 0;
    for (int i = 0; i < N; i++) {
        int a;
        cin >> a;
        ans ^= (a % K);
    }
    cout << (ans == 0 ? "NO" : "YES") << endl;
    return 0;
}
0