結果
問題 | No.2024 Xer |
ユーザー |
![]() |
提出日時 | 2022-08-07 01:59:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 106 ms / 2,000 ms |
コード長 | 870 bytes |
コンパイル時間 | 3,743 ms |
コンパイル使用メモリ | 233,528 KB |
実行使用メモリ | 5,708 KB |
最終ジャッジ日時 | 2024-09-16 20:04:41 |
合計ジャッジ時間 | 8,351 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 47 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)#define rep(i,n) REP(i,0,n)#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)#define ALLOF(c) (c).begin(), (c).end()typedef long long ll;typedef unsigned long long ull;//using mint = modint1000000007;//using mint = modint998244353;struct ST {int a, b;};bool operator<(const ST& x, const ST& y){return min(x.a,x.b) < min(y.a,y.b);}int main(){int N, X;cin >> N >> X;vector<ST> v;rep(i,N){int a;cin >> a;int b = a ^ X;v.push_back((ST){a,b});}sort(ALLOF(v));rep(i,N-1){if(v[i].a < v[i+1].b && v[i].b < v[i+1].a){; //ok}else{cout << "No" << endl;return 0;}}cout << "Yes" << endl;return 0;}