結果

問題 No.2024 Xer
ユーザー Carpenters-CatCarpenters-Cat
提出日時 2022-07-30 00:38:50
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 447 bytes
コンパイル時間 2,286 ms
コンパイル使用メモリ 202,504 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-09-27 01:06:08
合計ジャッジ時間 6,713 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 1 ms
4,380 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 76 ms
4,380 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 30 ms
4,380 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 43 ms
4,380 KB
testcase_21 AC 75 ms
4,380 KB
testcase_22 AC 75 ms
4,388 KB
testcase_23 AC 76 ms
4,380 KB
testcase_24 AC 75 ms
4,380 KB
testcase_25 AC 2 ms
4,384 KB
testcase_26 AC 3 ms
4,380 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 3 ms
4,384 KB
testcase_31 AC 4 ms
4,384 KB
testcase_32 WA -
testcase_33 AC 3 ms
4,380 KB
testcase_34 AC 2 ms
4,380 KB
testcase_35 AC 2 ms
4,380 KB
testcase_36 AC 2 ms
4,380 KB
testcase_37 AC 3 ms
4,380 KB
testcase_38 AC 3 ms
4,380 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 3 ms
4,384 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 59 ms
4,380 KB
testcase_46 AC 15 ms
4,380 KB
testcase_47 AC 45 ms
4,380 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main () {
    int N, X;
    cin >> N >> X;
    vector<int> A(N);
    for (auto& a : A) {
        cin >> a;
    }
    sort(A.begin(), A.end(), [=](int a, int b) {return a - a&X < b - b&X;});
    for (int i = 0; i < N - 1; i ++) {
        if ((A[i] >= (A[i + 1] ^ X)) || ((A[i] ^ X) >= A[i + 1])) {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}
0