結果
問題 | No.669 対決!!! 飲み比べ |
ユーザー |
![]() |
提出日時 | 2020-05-17 17:13:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 1,718 ms |
コンパイル使用メモリ | 167,880 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-25 10:08:53 |
合計ジャッジ時間 | 2,637 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll=long long;#define INF 1000000000000000000#define MOD 1000000007#define MAX 3000000using Graph=vector<vector<int>>;int main(){int N,K;cin>>N>>K;vector<int> A(N);for(int i=0;i<N;i++){cin>>A.at(i);A.at(i)%=K+1;}int ans=0;for(int i=0;i<N;i++){ans^=A.at(i);}if(ans>0){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}}