結果

問題 No.669 対決!!! 飲み比べ
ユーザー ts_
提出日時 2018-04-02 05:26:38
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 1,378 ms
コンパイル使用メモリ 157,792 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-26 06:30:20
合計ジャッジ時間 2,364 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)   FOR(i,0,n)
#define pb emplace_back
typedef long long ll;
typedef pair<int,int> pint;

int a[1001];
int main(){
    int n,k;
    cin>>n>>k;
    int sum=0,sg=0;
    rep(i,n){
        cin>>a[i];
        sg+=(a[i]/k)%2;
        a[i]%=k;
        sum^=a[i];
    }
    if(sg%2==1) sum^=k;
    if(sum==0) cout<<"NO"<<endl;
    else cout<<"YES"<<endl;
    return 0;
}
0