結果

問題 No.1456 Range Xor
ユーザー 小野寺健小野寺健
提出日時 2021-04-30 16:16:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 23,776 KB
最終ジャッジ日時 2023-09-25 16:42:14
合計ジャッジ時間 4,879 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,784 KB
testcase_01 AC 16 ms
7,780 KB
testcase_02 AC 17 ms
7,828 KB
testcase_03 AC 84 ms
23,584 KB
testcase_04 AC 84 ms
23,636 KB
testcase_05 AC 88 ms
23,684 KB
testcase_06 AC 82 ms
23,644 KB
testcase_07 AC 97 ms
23,732 KB
testcase_08 AC 86 ms
23,552 KB
testcase_09 AC 83 ms
23,776 KB
testcase_10 AC 81 ms
23,712 KB
testcase_11 AC 29 ms
10,880 KB
testcase_12 AC 22 ms
9,424 KB
testcase_13 AC 42 ms
13,848 KB
testcase_14 AC 37 ms
13,712 KB
testcase_15 AC 68 ms
18,628 KB
testcase_16 AC 63 ms
19,352 KB
testcase_17 AC 51 ms
14,860 KB
testcase_18 AC 35 ms
13,340 KB
testcase_19 AC 54 ms
18,556 KB
testcase_20 AC 62 ms
18,528 KB
testcase_21 AC 52 ms
17,880 KB
testcase_22 AC 56 ms
17,720 KB
testcase_23 AC 39 ms
14,016 KB
testcase_24 AC 27 ms
10,764 KB
testcase_25 AC 39 ms
13,168 KB
testcase_26 AC 57 ms
16,740 KB
testcase_27 AC 59 ms
18,800 KB
testcase_28 AC 36 ms
12,824 KB
testcase_29 AC 97 ms
23,528 KB
testcase_30 AC 79 ms
23,372 KB
testcase_31 AC 34 ms
11,500 KB
testcase_32 AC 31 ms
10,980 KB
testcase_33 AC 44 ms
14,576 KB
testcase_34 AC 81 ms
23,608 KB
testcase_35 AC 49 ms
16,764 KB
testcase_36 AC 85 ms
23,612 KB
testcase_37 AC 93 ms
18,644 KB
testcase_38 AC 29 ms
10,812 KB
testcase_39 AC 64 ms
18,456 KB
testcase_40 AC 74 ms
18,332 KB
testcase_41 AC 17 ms
8,456 KB
testcase_42 AC 24 ms
9,668 KB
testcase_43 AC 16 ms
7,848 KB
testcase_44 AC 17 ms
7,748 KB
testcase_45 AC 16 ms
7,812 KB
testcase_46 AC 16 ms
7,792 KB
testcase_47 AC 17 ms
7,880 KB
testcase_48 AC 16 ms
7,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())

A = list(map(int, input().split()))

d = dict()
X = K
d[X] = True
for a in A:
    X ^= a
    d[X] = True

X = 0
for a in A:
    X ^= a
    if X in d:
        print('Yes')
        break
else:
    print('No')
0