結果
問題 |
No.669 対決!!! 飲み比べ
|
ユーザー |
|
提出日時 | 2024-02-14 22:30:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 713 bytes |
コンパイル時間 | 802 ms |
コンパイル使用メモリ | 96,360 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-09-28 19:02:37 |
合計ジャッジ時間 | 1,521 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <numeric> #include <map> #include <algorithm> #include <set> #include <queue> #include <random> using namespace std; #define rep(i,m,n) for(int i=m; i<n; i++) #define INF (1 << 30) using ll = long long; using ull = unsigned long long; std::random_device rng; //test //erase leaves: std::iota, union_find //swapping puzzle: std::next_permutation //festival: lower_bound int main() { int n, k; cin >> n >> k; int ans = 0; rep(i, 0, n) { int a; cin >> a; ans ^= (a % (k + 1)); } if (0 < ans) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }