結果

問題 No.2024 Xer
ユーザー kabipoyokabipoyo
提出日時 2022-07-30 05:43:24
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 1,403 bytes
コンパイル時間 4,169 ms
コンパイル使用メモリ 267,056 KB
実行使用メモリ 8,152 KB
最終ジャッジ日時 2023-09-27 06:08:43
合計ジャッジ時間 9,520 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 87 ms
7,764 KB
testcase_08 AC 84 ms
7,896 KB
testcase_09 AC 109 ms
8,152 KB
testcase_10 AC 86 ms
7,728 KB
testcase_11 AC 34 ms
4,732 KB
testcase_12 AC 59 ms
5,728 KB
testcase_13 AC 65 ms
6,264 KB
testcase_14 AC 100 ms
7,580 KB
testcase_15 AC 44 ms
4,948 KB
testcase_16 AC 68 ms
6,196 KB
testcase_17 AC 41 ms
5,228 KB
testcase_18 AC 38 ms
4,980 KB
testcase_19 AC 100 ms
7,524 KB
testcase_20 AC 61 ms
6,100 KB
testcase_21 AC 107 ms
8,148 KB
testcase_22 AC 106 ms
8,148 KB
testcase_23 AC 104 ms
8,140 KB
testcase_24 AC 104 ms
8,152 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 4 ms
4,380 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 2 ms
4,380 KB
testcase_29 AC 2 ms
4,384 KB
testcase_30 AC 3 ms
4,500 KB
testcase_31 AC 4 ms
4,376 KB
testcase_32 AC 4 ms
4,384 KB
testcase_33 AC 3 ms
4,376 KB
testcase_34 AC 2 ms
4,376 KB
testcase_35 AC 2 ms
4,380 KB
testcase_36 AC 3 ms
4,380 KB
testcase_37 AC 3 ms
4,376 KB
testcase_38 AC 4 ms
4,376 KB
testcase_39 AC 2 ms
4,376 KB
testcase_40 AC 2 ms
4,380 KB
testcase_41 AC 3 ms
4,380 KB
testcase_42 AC 4 ms
4,380 KB
testcase_43 AC 3 ms
4,380 KB
testcase_44 AC 3 ms
4,376 KB
testcase_45 AC 85 ms
7,080 KB
testcase_46 AC 19 ms
4,376 KB
testcase_47 AC 62 ms
6,244 KB
testcase_48 AC 2 ms
4,376 KB
testcase_49 AC 2 ms
4,380 KB
testcase_50 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef int64_t lint;
#define rep(i, n) for(int i=0; i<n; i++)
#define repx(i, l, n) for(int i=l; i<n; i++)
#define all(v) v.begin(), v.end()
#define show(x) cout << #x << ": " << x << endl;
#define list(x) cout << #x << ": " << x << "  ";
#define pb push_back
using vi = vector<lint>;
using vvi = vector<vector<lint>>;
template<class T> inline void vin(vector<T>& v) { rep(i, v.size()) cin >> v.at(i); }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T> inline void drop(T x) { cout << x << endl; exit(0); }
template<class T> void vout(vector<T> v) { rep(i, v.size()) { cout << v.at(i) << ' '; } cout << endl; }
constexpr lint LINF = LLONG_MAX/2;
using pint = pair<lint, lint>;
using vp = vector<pint>;
bool func(const pair<int, int>& lhs, const pair<int, int>& rhs) {
	if (min(lhs.first, lhs.second) < min(rhs.first, rhs.second)) return true;
	return false;
}

int main() {
	lint N, X;
	cin >> N >> X;
	vi v(N);
	vin(v);

	lint a=0, b=0, c=0, x, y, z;
	vp p(N);
	rep(i, N) {
		p[i] = {v[i], (v[i]^X)};
	}
	sort(all(p), func);
	rep(i, N-1) {
		tie(x, y) = p[i];
		tie(a, b) = p[i+1];
		if (x >= b || y >= a) drop("No");
	}
	std::cout << "Yes" << '\n';
}
0