結果
| 問題 | 
                            No.669 対決!!! 飲み比べ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kobaryo222
                         | 
                    
| 提出日時 | 2023-05-19 19:13:37 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 1,007 bytes | 
| コンパイル時間 | 1,979 ms | 
| コンパイル使用メモリ | 194,404 KB | 
| 最終ジャッジ日時 | 2025-02-13 01:16:40 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 25 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (ll i = ll(a); i < ll(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define rrep(i, a, n) for (ll i = n - 1; i >= a; i--)
#define LINF (1LL << 60)
#define INF (1 << 30)
#define fs first
#define sc second
#define ALL(a) a.begin(), a.end()
template <typename T>
void chmin(T& a, T b) {
    if (a > b) a = b;
}
template <typename T>
void chmax(T& a, T b) {
    if (a < b) a = b;
}
struct edge {
    ll to, cost;
    edge(ll e_to, ll e_cost) : to(e_to), cost(e_cost) {}
};
typedef vector<vector<edge>> Graph;
int main() {
    ll N, K;
    cin >> N >> K;
    vector<ll> A(N);
    rep(i, N) cin >> A[i];
    vector<ll> G(N);
    rep(i, N) G[i] = A[i] % (K + 1);
    ll xor_G = 0;
    rep(i, N) xor_G ^= G[i];
    if (xor_G == 0)
        cout << "NO" << endl;
    else
        cout << "YES" << endl;
}
            
            
            
        
            
kobaryo222