結果

問題 No.669 対決!!! 飲み比べ
ユーザー iomir
提出日時 2023-04-29 00:48:40
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 383 bytes
コンパイル時間 1,774 ms
コンパイル使用メモリ 169,736 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-17 23:17:31
合計ジャッジ時間 2,478 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

#define all(v) v.begin(),v.end()
using ll = long long;
const ll INF=1ll<<60;

int main(){
    ll N,K;
    cin>>N>>K;
    vector<ll> A(N);
    for(int i=0;i<N;i++){
        cin>>A[i];
        A[i]%=K+1;
    }

    ll a=0;
    for(int i=0;i<N;i++){
        a^=A[i];
    }
    if(a) cout << "YES" << endl;
    else cout << "NO" << endl;
}

0