結果
問題 |
No.669 対決!!! 飲み比べ
|
ユーザー |
![]() |
提出日時 | 2018-03-23 22:59:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 382 bytes |
コンパイル時間 | 1,651 ms |
コンパイル使用メモリ | 165,924 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-24 22:40:05 |
合計ジャッジ時間 | 3,175 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 14 WA * 11 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define rep(i,a) for(int i=0;i<(a);i++) #define MOD 1000000007 int main(){ int N,K; cin>>N>>K; int cnt=0; rep(i,N){ int a; cin>>a; if(a>0){ cnt++; cnt+=a/(K+1)+(a%(K+1)?1:0); } } if(cnt%2) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }