結果

問題 No.1456 Range Xor
ユーザー 👑 H20H20
提出日時 2021-04-01 13:34:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 438 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 112,076 KB
最終ジャッジ日時 2023-08-22 17:12:47
合計ジャッジ時間 7,176 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,312 KB
testcase_01 AC 71 ms
71,392 KB
testcase_02 AC 71 ms
71,256 KB
testcase_03 AC 117 ms
112,068 KB
testcase_04 AC 115 ms
112,068 KB
testcase_05 AC 116 ms
111,940 KB
testcase_06 AC 113 ms
111,952 KB
testcase_07 AC 117 ms
111,816 KB
testcase_08 AC 116 ms
112,076 KB
testcase_09 AC 117 ms
111,748 KB
testcase_10 AC 113 ms
111,948 KB
testcase_11 AC 82 ms
79,284 KB
testcase_12 AC 79 ms
76,600 KB
testcase_13 AC 87 ms
83,600 KB
testcase_14 AC 85 ms
83,944 KB
testcase_15 AC 111 ms
106,676 KB
testcase_16 AC 107 ms
103,648 KB
testcase_17 AC 92 ms
88,840 KB
testcase_18 AC 87 ms
83,656 KB
testcase_19 AC 100 ms
97,272 KB
testcase_20 AC 109 ms
103,548 KB
testcase_21 AC 101 ms
96,968 KB
testcase_22 AC 101 ms
96,996 KB
testcase_23 AC 88 ms
85,352 KB
testcase_24 AC 83 ms
77,772 KB
testcase_25 AC 88 ms
82,572 KB
testcase_26 AC 97 ms
92,084 KB
testcase_27 AC 104 ms
100,068 KB
testcase_28 AC 86 ms
81,400 KB
testcase_29 AC 115 ms
107,696 KB
testcase_30 AC 115 ms
111,760 KB
testcase_31 AC 86 ms
80,496 KB
testcase_32 AC 82 ms
79,124 KB
testcase_33 AC 91 ms
87,072 KB
testcase_34 AC 112 ms
111,032 KB
testcase_35 AC 94 ms
92,120 KB
testcase_36 AC 114 ms
111,628 KB
testcase_37 AC 112 ms
107,492 KB
testcase_38 AC 80 ms
77,884 KB
testcase_39 AC 104 ms
100,508 KB
testcase_40 AC 104 ms
100,452 KB
testcase_41 AC 83 ms
76,404 KB
testcase_42 AC 78 ms
76,716 KB
testcase_43 AC 70 ms
71,440 KB
testcase_44 AC 70 ms
71,320 KB
testcase_45 AC 69 ms
71,356 KB
testcase_46 AC 71 ms
70,996 KB
testcase_47 AC 71 ms
71,480 KB
testcase_48 AC 71 ms
71,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
A = list(map(int,input().split()))
XORA = [A[0]]
for i in range(1,N):
    XORA.append(XORA[-1]^A[i])
SXORA = set(XORA)
if K in SXORA:
    print('Yes')
    exit()
TEMP = 0
for i in range(N):
    TEMP = TEMP ^ A[i]
    if K^TEMP in SXORA:
        print('Yes')
        exit()


print('No')
0