結果

問題 No.2024 Xer
ユーザー wanuiwanui
提出日時 2022-07-29 22:19:01
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,298 bytes
コンパイル時間 2,682 ms
コンパイル使用メモリ 208,024 KB
実行使用メモリ 7,800 KB
最終ジャッジ日時 2023-09-26 21:33:58
合計ジャッジ時間 5,415 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,376 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 42 ms
7,772 KB
testcase_08 AC 30 ms
7,720 KB
testcase_09 AC 47 ms
7,800 KB
testcase_10 AC 31 ms
7,780 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 19 ms
4,936 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 27 ms
5,612 KB
testcase_21 AC 47 ms
7,656 KB
testcase_22 AC 47 ms
7,736 KB
testcase_23 AC 47 ms
7,796 KB
testcase_24 AC 48 ms
7,736 KB
testcase_25 AC 1 ms
4,380 KB
testcase_26 AC 3 ms
4,376 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 2 ms
4,376 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 3 ms
4,380 KB
testcase_32 WA -
testcase_33 AC 2 ms
4,380 KB
testcase_34 AC 1 ms
4,380 KB
testcase_35 AC 2 ms
4,376 KB
testcase_36 AC 2 ms
4,380 KB
testcase_37 AC 3 ms
4,376 KB
testcase_38 AC 2 ms
4,380 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 2 ms
4,380 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 37 ms
6,760 KB
testcase_46 AC 9 ms
4,376 KB
testcase_47 AC 28 ms
5,992 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
// clang-format off
using namespace std; using ll=long long; using ull=unsigned long long; using pll=pair<ll,ll>; const ll INF=4e18;
void print0(){}; template<typename H,typename... T> void print0(H h,T... t){cout<<h;print0(t...);}
void print(){print0("\n");}; template<typename H,typename... T>void print(H h,T... t){print0(h);if(sizeof...(T)>0)print0(" ");print(t...);}
void perr0(){}; template<typename H,typename... T> void perr0(H h,T... t){cerr<<h;perr0(t...);}
void perr(){perr0("\n");}; template<typename H,typename... T>void perr(H h,T... t){perr0(h);if(sizeof...(T)>0)perr0(" ");perr(t...);}
void ioinit() { cout<<fixed<<setprecision(15); cerr<<fixed<<setprecision(6); ios_base::sync_with_stdio(0); cin.tie(0); }
// clang-format on

int main() {
    ioinit();
    //嘘貪欲
    ll N, X;
    cin >> N >> X;
    vector<ll> A(N);
    for (ll i = 0; i < N; i++) {
        cin >> A[i];
    }
    vector<pll> B(N);
    for (ll i = 0; i < N; i++) {
        B[i] = {A[i] ^ X, A[i]};
    }
    sort(B.begin(), B.end());
    bool ok = true;
    for (ll i = 0; i < N - 1; i++) {
        if (B[i].first < B[i + 1].second && B[i].second < B[i + 1].first) {
            ;
        } else {
            ok = false;
        }
    }
    print(ok ? "Yes" : "No");
    return 0;
}
0