結果

問題 No.2024 Xer
ユーザー どららどらら
提出日時 2022-08-07 01:59:34
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 870 bytes
コンパイル時間 3,920 ms
コンパイル使用メモリ 232,112 KB
実行使用メモリ 5,316 KB
最終ジャッジ日時 2023-10-15 02:33:08
合計ジャッジ時間 9,765 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,352 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,352 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 77 ms
5,312 KB
testcase_08 AC 76 ms
5,308 KB
testcase_09 AC 96 ms
5,248 KB
testcase_10 AC 77 ms
5,096 KB
testcase_11 AC 29 ms
4,352 KB
testcase_12 AC 49 ms
4,372 KB
testcase_13 AC 56 ms
4,372 KB
testcase_14 AC 92 ms
5,164 KB
testcase_15 AC 41 ms
4,368 KB
testcase_16 AC 64 ms
5,096 KB
testcase_17 AC 37 ms
4,348 KB
testcase_18 AC 36 ms
4,352 KB
testcase_19 AC 86 ms
5,156 KB
testcase_20 AC 53 ms
4,352 KB
testcase_21 AC 97 ms
5,168 KB
testcase_22 AC 96 ms
5,164 KB
testcase_23 AC 96 ms
5,300 KB
testcase_24 AC 94 ms
5,316 KB
testcase_25 AC 2 ms
4,352 KB
testcase_26 AC 3 ms
4,348 KB
testcase_27 AC 3 ms
4,348 KB
testcase_28 AC 3 ms
4,348 KB
testcase_29 AC 2 ms
4,356 KB
testcase_30 AC 3 ms
4,352 KB
testcase_31 AC 3 ms
4,348 KB
testcase_32 AC 4 ms
4,352 KB
testcase_33 AC 3 ms
4,348 KB
testcase_34 AC 2 ms
4,356 KB
testcase_35 AC 1 ms
4,348 KB
testcase_36 AC 3 ms
4,352 KB
testcase_37 AC 4 ms
4,352 KB
testcase_38 AC 4 ms
4,356 KB
testcase_39 AC 2 ms
4,352 KB
testcase_40 AC 2 ms
4,352 KB
testcase_41 AC 2 ms
4,352 KB
testcase_42 AC 3 ms
4,356 KB
testcase_43 AC 3 ms
4,348 KB
testcase_44 AC 3 ms
4,352 KB
testcase_45 AC 75 ms
5,160 KB
testcase_46 AC 18 ms
4,352 KB
testcase_47 AC 55 ms
4,352 KB
testcase_48 AC 1 ms
4,356 KB
testcase_49 AC 2 ms
4,348 KB
testcase_50 AC 2 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0