結果

問題 No.1456 Range Xor
ユーザー hiragnhiragn
提出日時 2022-11-26 21:11:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 23,392 KB
最終ジャッジ日時 2024-04-14 07:05:44
合計ジャッジ時間 5,470 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,624 KB
testcase_01 AC 33 ms
10,624 KB
testcase_02 AC 31 ms
10,624 KB
testcase_03 AC 71 ms
21,680 KB
testcase_04 AC 71 ms
21,680 KB
testcase_05 AC 80 ms
21,808 KB
testcase_06 AC 67 ms
21,656 KB
testcase_07 AC 86 ms
21,684 KB
testcase_08 AC 79 ms
21,812 KB
testcase_09 AC 68 ms
21,808 KB
testcase_10 AC 73 ms
21,680 KB
testcase_11 AC 41 ms
13,404 KB
testcase_12 AC 36 ms
12,160 KB
testcase_13 AC 51 ms
16,964 KB
testcase_14 AC 44 ms
14,596 KB
testcase_15 AC 62 ms
19,572 KB
testcase_16 AC 66 ms
18,988 KB
testcase_17 AC 58 ms
16,948 KB
testcase_18 AC 42 ms
14,420 KB
testcase_19 AC 64 ms
18,328 KB
testcase_20 AC 67 ms
18,712 KB
testcase_21 AC 61 ms
17,636 KB
testcase_22 AC 55 ms
17,440 KB
testcase_23 AC 50 ms
17,032 KB
testcase_24 AC 38 ms
12,928 KB
testcase_25 AC 49 ms
16,136 KB
testcase_26 AC 61 ms
17,496 KB
testcase_27 AC 65 ms
18,764 KB
testcase_28 AC 46 ms
15,908 KB
testcase_29 AC 92 ms
23,392 KB
testcase_30 AC 75 ms
21,000 KB
testcase_31 AC 47 ms
15,700 KB
testcase_32 AC 41 ms
13,568 KB
testcase_33 AC 52 ms
16,640 KB
testcase_34 AC 76 ms
20,948 KB
testcase_35 AC 58 ms
17,832 KB
testcase_36 AC 75 ms
21,416 KB
testcase_37 AC 88 ms
23,312 KB
testcase_38 AC 39 ms
12,928 KB
testcase_39 AC 59 ms
18,744 KB
testcase_40 AC 72 ms
18,684 KB
testcase_41 AC 32 ms
11,008 KB
testcase_42 AC 36 ms
12,416 KB
testcase_43 AC 31 ms
10,752 KB
testcase_44 AC 31 ms
10,752 KB
testcase_45 AC 30 ms
10,624 KB
testcase_46 AC 31 ms
10,752 KB
testcase_47 AC 30 ms
10,496 KB
testcase_48 AC 34 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    n, k = map(int, input().split())
    arr = list(map(int, input().split()))

    s = set()
    s.add(0)
    now = 0
    for a in arr:
        now = now ^ a
        tmp = now ^ k
        if tmp in s:
            exit(print("Yes"))
        s.add(now)
    print("No")


if __name__ == "__main__":
    main()
0