結果

問題 No.669 対決!!! 飲み比べ
ユーザー ama_nuko
提出日時 2018-07-13 18:48:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 644 bytes
コンパイル時間 854 ms
コンパイル使用メモリ 94,496 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 03:07:29
合計ジャッジ時間 1,858 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cmath>
#include <iostream>
#include <vector>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <tuple>
#include <bitset>
#include <algorithm>
#include <functional>
#include <utility>
#include <iomanip>

#define int long long int
#define rep(i, n) for(int i = 0; i < (n); ++i)

using namespace std;

typedef pair<int, int> P;

const int INF = 1e15;
const int MOD = 1e9+7;

signed main(){
    int n, k;
    cin >> n >> k;
    int ans = 0;
    rep(i, n){
        int a;
        cin >> a;
        a %= (k+1);
        ans ^= a;
    }

    cout << (ans != 0 ? "YES" : "NO") << endl;

    return 0;
}
0