結果

問題 No.669 対決!!! 飲み比べ
ユーザー ats5515ats5515
提出日時 2018-03-23 22:34:16
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 520 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 82,972 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-25 02:02:13
合計ジャッジ時間 1,579 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N, K;
	cin >> N >> K;
	vector<int> A(N);
	int res = 0;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
		res ^= (A[i] % (K + 1));
	}
	if (res == 0) {
		cout << "NO" << endl;
	}
	else {
		cout << "YES" << endl;
	}
}
0