結果

問題 No.669 対決!!! 飲み比べ
ユーザー 🍮かんプリン
提出日時 2020-06-08 17:59:31
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 1,507 ms
コンパイル使用メモリ 156,924 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-26 01:11:37
合計ジャッジ時間 2,525 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

/**
 *   @FileName	a.cpp
 *   @Author	kanpurin
 *   @Created	2020.06.08 17:59:28
**/

#include "bits/stdc++.h" 
using namespace std; 
typedef long long ll;

int main() {
    int n,k;cin >> n >> k;
    int ans = 0;
    for (int i = 0; i < n; i++) {
        int a;cin >> a;
        a %= k + 1;
        ans ^= a;
    }
    if (ans == 0) {
        puts("NO");
    }
    else {
        puts("YES");
    }
    return 0;
}
0