結果

問題 No.1456 Range Xor
ユーザー lie_of_lillielie_of_lillie
提出日時 2021-04-27 15:24:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 150 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 30,968 KB
最終ジャッジ日時 2023-09-20 16:10:26
合計ジャッジ時間 5,415 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,400 KB
testcase_01 AC 19 ms
8,360 KB
testcase_02 AC 18 ms
8,320 KB
testcase_03 AC 113 ms
30,968 KB
testcase_04 AC 115 ms
30,944 KB
testcase_05 AC 112 ms
30,928 KB
testcase_06 AC 115 ms
30,928 KB
testcase_07 AC 115 ms
30,892 KB
testcase_08 AC 115 ms
30,944 KB
testcase_09 AC 115 ms
30,968 KB
testcase_10 AC 115 ms
30,896 KB
testcase_11 AC 33 ms
11,456 KB
testcase_12 AC 25 ms
10,500 KB
testcase_13 AC 47 ms
17,632 KB
testcase_14 AC 47 ms
17,396 KB
testcase_15 AC 97 ms
28,768 KB
testcase_16 AC 84 ms
21,928 KB
testcase_17 AC 59 ms
18,764 KB
testcase_18 AC 49 ms
17,416 KB
testcase_19 AC 72 ms
20,284 KB
testcase_20 AC 85 ms
21,900 KB
testcase_21 AC 71 ms
20,012 KB
testcase_22 AC 75 ms
20,312 KB
testcase_23 AC 50 ms
17,508 KB
testcase_24 AC 31 ms
11,680 KB
testcase_25 AC 45 ms
16,352 KB
testcase_26 AC 60 ms
18,632 KB
testcase_27 AC 79 ms
20,924 KB
testcase_28 AC 42 ms
16,224 KB
testcase_29 AC 103 ms
30,028 KB
testcase_30 AC 109 ms
30,284 KB
testcase_31 AC 41 ms
16,336 KB
testcase_32 AC 34 ms
11,592 KB
testcase_33 AC 53 ms
17,760 KB
testcase_34 AC 107 ms
30,120 KB
testcase_35 AC 62 ms
18,908 KB
testcase_36 AC 113 ms
30,756 KB
testcase_37 AC 101 ms
29,160 KB
testcase_38 AC 31 ms
11,620 KB
testcase_39 AC 83 ms
21,528 KB
testcase_40 AC 81 ms
21,724 KB
testcase_41 AC 19 ms
8,856 KB
testcase_42 AC 27 ms
10,688 KB
testcase_43 AC 18 ms
8,436 KB
testcase_44 AC 18 ms
8,372 KB
testcase_45 AC 18 ms
8,320 KB
testcase_46 AC 18 ms
8,396 KB
testcase_47 AC 18 ms
8,396 KB
testcase_48 AC 18 ms
8,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

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

l0 = [0]
for i in range(len(A)):
    l0.append(l0[-1] ^ A[i])

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