結果

問題 No.1456 Range Xor
ユーザー tktk_snsntktk_snsn
提出日時 2021-09-17 07:58:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 21,452 KB
最終ジャッジ日時 2023-09-12 04:18:29
合計ジャッジ時間 6,787 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,176 KB
testcase_01 AC 17 ms
8,256 KB
testcase_02 AC 17 ms
8,104 KB
testcase_03 AC 51 ms
19,164 KB
testcase_04 AC 57 ms
19,268 KB
testcase_05 AC 72 ms
19,284 KB
testcase_06 AC 52 ms
19,172 KB
testcase_07 AC 81 ms
19,204 KB
testcase_08 AC 67 ms
19,204 KB
testcase_09 AC 52 ms
19,268 KB
testcase_10 AC 60 ms
19,076 KB
testcase_11 AC 28 ms
10,848 KB
testcase_12 AC 22 ms
9,596 KB
testcase_13 AC 41 ms
14,064 KB
testcase_14 AC 31 ms
11,984 KB
testcase_15 AC 45 ms
17,100 KB
testcase_16 AC 54 ms
17,108 KB
testcase_17 AC 50 ms
15,468 KB
testcase_18 AC 29 ms
11,960 KB
testcase_19 AC 56 ms
15,464 KB
testcase_20 AC 58 ms
17,344 KB
testcase_21 AC 46 ms
16,088 KB
testcase_22 AC 41 ms
14,944 KB
testcase_23 AC 41 ms
14,844 KB
testcase_24 AC 27 ms
10,468 KB
testcase_25 AC 39 ms
13,764 KB
testcase_26 AC 53 ms
15,208 KB
testcase_27 AC 52 ms
16,232 KB
testcase_28 AC 37 ms
13,936 KB
testcase_29 AC 90 ms
21,452 KB
testcase_30 AC 63 ms
18,648 KB
testcase_31 AC 35 ms
13,216 KB
testcase_32 AC 29 ms
10,812 KB
testcase_33 AC 42 ms
15,096 KB
testcase_34 AC 66 ms
18,588 KB
testcase_35 AC 47 ms
15,172 KB
testcase_36 AC 64 ms
18,860 KB
testcase_37 AC 84 ms
21,388 KB
testcase_38 AC 27 ms
10,760 KB
testcase_39 AC 45 ms
16,108 KB
testcase_40 AC 68 ms
16,456 KB
testcase_41 AC 19 ms
8,492 KB
testcase_42 AC 25 ms
9,860 KB
testcase_43 AC 17 ms
8,212 KB
testcase_44 AC 18 ms
8,284 KB
testcase_45 AC 18 ms
8,276 KB
testcase_46 AC 17 ms
8,116 KB
testcase_47 AC 17 ms
8,072 KB
testcase_48 AC 16 ms
8,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from operator import xor
from itertools import accumulate


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

ans = "No"
used = {0, }
for a in accumulate(A, func=xor):
    if K ^ a in used:
        ans = "Yes"
        break
    used.add(a)

print(ans)
0