結果

問題 No.669 対決!!! 飲み比べ
ユーザー ts_ts_
提出日時 2018-04-02 05:26:38
言語 C++11
(gcc 11.4.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
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 1 ms
6,940 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,944 KB
testcase_13 AC 2 ms
6,944 KB
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 2 ms
6,944 KB
testcase_17 AC 2 ms
6,944 KB
testcase_18 AC 2 ms
6,944 KB
testcase_19 AC 1 ms
6,944 KB
testcase_20 AC 1 ms
6,944 KB
testcase_21 AC 1 ms
6,940 KB
testcase_22 AC 1 ms
6,944 KB
testcase_23 AC 2 ms
6,944 KB
testcase_24 AC 2 ms
6,944 KB
testcase_25 AC 2 ms
6,940 KB
testcase_26 AC 1 ms
6,944 KB
testcase_27 AC 2 ms
6,944 KB
testcase_28 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

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