結果

問題 No.1456 Range Xor
ユーザー kokatsukokatsu
提出日時 2021-12-08 22:31:38
言語 D
(dmd 2.106.1)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 2,171 ms
コンパイル使用メモリ 205,224 KB
実行使用メモリ 13,076 KB
最終ジャッジ日時 2023-09-04 15:14:30
合計ジャッジ時間 7,019 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 24 ms
8,220 KB
testcase_04 AC 25 ms
8,744 KB
testcase_05 AC 30 ms
12,280 KB
testcase_06 AC 23 ms
8,228 KB
testcase_07 AC 33 ms
12,056 KB
testcase_08 AC 30 ms
10,972 KB
testcase_09 AC 24 ms
8,480 KB
testcase_10 AC 27 ms
10,772 KB
testcase_11 AC 9 ms
6,612 KB
testcase_12 AC 4 ms
4,636 KB
testcase_13 AC 14 ms
7,980 KB
testcase_14 AC 11 ms
5,444 KB
testcase_15 AC 20 ms
8,984 KB
testcase_16 AC 23 ms
9,960 KB
testcase_17 AC 17 ms
9,424 KB
testcase_18 AC 9 ms
4,652 KB
testcase_19 AC 23 ms
12,720 KB
testcase_20 AC 24 ms
11,996 KB
testcase_21 AC 18 ms
8,336 KB
testcase_22 AC 17 ms
8,116 KB
testcase_23 AC 14 ms
8,424 KB
testcase_24 AC 7 ms
4,884 KB
testcase_25 AC 14 ms
7,508 KB
testcase_26 AC 20 ms
9,972 KB
testcase_27 AC 21 ms
9,688 KB
testcase_28 AC 10 ms
4,836 KB
testcase_29 AC 34 ms
13,076 KB
testcase_30 AC 27 ms
10,704 KB
testcase_31 AC 9 ms
4,884 KB
testcase_32 AC 9 ms
5,124 KB
testcase_33 AC 15 ms
9,596 KB
testcase_34 AC 29 ms
11,688 KB
testcase_35 AC 19 ms
10,788 KB
testcase_36 AC 27 ms
11,480 KB
testcase_37 AC 32 ms
12,628 KB
testcase_38 AC 7 ms
4,884 KB
testcase_39 AC 19 ms
7,428 KB
testcase_40 AC 26 ms
10,024 KB
testcase_41 AC 2 ms
4,376 KB
testcase_42 AC 6 ms
4,892 KB
testcase_43 AC 2 ms
4,380 KB
testcase_44 AC 2 ms
4,380 KB
testcase_45 AC 1 ms
4,376 KB
testcase_46 AC 2 ms
4,376 KB
testcase_47 AC 2 ms
4,376 KB
testcase_48 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import std;

void main() {
    int N, K;
    readf("%d %d\n", N, K);

    auto A = readln.chomp.split.to!(int[]);

    auto B = A.cumulativeFold!"a ^ b".array;

    bool[int] list;
    list[0] = true;
    bool isOK;
    foreach (b; B) {
        if ((b ^ K) in list) {
            isOK = true;
            break;
        }

        list[b] = true;
    }

    writeln(isOK ? "Yes" : "No");
}
0