結果

問題 No.669 対決!!! 飲み比べ
ユーザー J31831276J31831276
提出日時 2018-12-29 12:27:07
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 333 bytes
コンパイル時間 484 ms
コンパイル使用メモリ 60,244 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-01 15:09:16
合計ジャッジ時間 1,493 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cmath>

#define ll long long

using namespace std;


int main(){

   int n,k,nim=0,a;
   cin>>n>>k;
   for(int i=0;i<n;++i) {
       cin>>a;
       if(!(a%(k+1))) nim^=1;
   }
   if(nim) cout<<"NO"<<endl;
   else cout<<"YES"<<endl;
   return 0;
}
0