結果
問題 | No.669 対決!!! 飲み比べ |
ユーザー |
![]() |
提出日時 | 2018-04-02 05:53:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 1,303 ms |
コンパイル使用メモリ | 158,960 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-26 06:30:36 |
合計ジャッジ時間 | 2,229 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#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; ++k; rep(i,n){ cin>>a[i]; a[i]%=k; sum^=a[i]; } if(sum==0) cout<<"NO"<<endl; else cout<<"YES"<<endl; return 0; }