結果

問題 No.1456 Range Xor
ユーザー lie_of_lillielie_of_lillie
提出日時 2021-04-27 15:19:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 377 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 31,076 KB
最終ジャッジ日時 2023-09-20 16:05:52
合計ジャッジ時間 7,803 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,352 KB
testcase_01 AC 17 ms
8,404 KB
testcase_02 AC 18 ms
8,508 KB
testcase_03 AC 124 ms
30,960 KB
testcase_04 AC 121 ms
31,076 KB
testcase_05 AC 121 ms
30,892 KB
testcase_06 AC 122 ms
30,876 KB
testcase_07 AC 122 ms
30,952 KB
testcase_08 AC 121 ms
30,896 KB
testcase_09 AC 123 ms
30,920 KB
testcase_10 AC 124 ms
30,908 KB
testcase_11 AC 35 ms
11,480 KB
testcase_12 AC 26 ms
10,552 KB
testcase_13 AC 50 ms
17,400 KB
testcase_14 AC 50 ms
17,540 KB
testcase_15 AC 104 ms
28,732 KB
testcase_16 AC 91 ms
22,024 KB
testcase_17 AC 61 ms
18,660 KB
testcase_18 AC 50 ms
17,392 KB
testcase_19 AC 76 ms
20,120 KB
testcase_20 AC 89 ms
21,912 KB
testcase_21 AC 74 ms
19,952 KB
testcase_22 AC 78 ms
20,332 KB
testcase_23 AC 52 ms
17,512 KB
testcase_24 AC 31 ms
11,600 KB
testcase_25 AC 47 ms
16,472 KB
testcase_26 AC 64 ms
18,504 KB
testcase_27 AC 83 ms
21,140 KB
testcase_28 AC 43 ms
16,364 KB
testcase_29 AC 111 ms
30,076 KB
testcase_30 AC 116 ms
30,372 KB
testcase_31 AC 42 ms
16,160 KB
testcase_32 AC 35 ms
11,536 KB
testcase_33 AC 57 ms
17,740 KB
testcase_34 AC 115 ms
30,236 KB
testcase_35 AC 65 ms
18,888 KB
testcase_36 AC 120 ms
30,752 KB
testcase_37 AC 108 ms
29,256 KB
testcase_38 AC 32 ms
11,712 KB
testcase_39 AC 87 ms
21,476 KB
testcase_40 AC 87 ms
21,808 KB
testcase_41 AC 19 ms
8,892 KB
testcase_42 AC 27 ms
10,636 KB
testcase_43 WA -
testcase_44 AC 18 ms
8,332 KB
testcase_45 AC 17 ms
8,364 KB
testcase_46 AC 18 ms
8,440 KB
testcase_47 WA -
testcase_48 AC 18 ms
8,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

# X^X=0
# X^0=X

l0 = [0]*len(A)
l0[0] = A[0]
for i, a in enumerate(A):
    if i == 0:
        l0[0] ^= 0
        continue
    l0[i] = l0[i-1] ^ a

l1 = copy.copy(l0)
for i in range(len(l0)):
    l0[i] ^= K

# print(l0, l1)
if len(set(l0) & set(l1)) >= 1:
    print("Yes")
else:
    print("No")
0