結果

問題 No.1456 Range Xor
ユーザー lloyzlloyz
提出日時 2022-02-15 00:38:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 125 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 21,260 KB
最終ジャッジ日時 2023-09-11 16:50:52
合計ジャッジ時間 6,220 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,984 KB
testcase_01 AC 16 ms
8,056 KB
testcase_02 AC 16 ms
7,796 KB
testcase_03 AC 53 ms
18,788 KB
testcase_04 AC 60 ms
18,760 KB
testcase_05 AC 77 ms
18,800 KB
testcase_06 AC 53 ms
18,824 KB
testcase_07 AC 84 ms
18,804 KB
testcase_08 AC 72 ms
18,856 KB
testcase_09 AC 54 ms
18,908 KB
testcase_10 AC 63 ms
18,904 KB
testcase_11 AC 30 ms
10,560 KB
testcase_12 AC 22 ms
9,572 KB
testcase_13 AC 41 ms
13,960 KB
testcase_14 AC 31 ms
11,792 KB
testcase_15 AC 45 ms
16,980 KB
testcase_16 AC 57 ms
17,072 KB
testcase_17 AC 52 ms
15,244 KB
testcase_18 AC 27 ms
11,880 KB
testcase_19 AC 55 ms
16,332 KB
testcase_20 AC 58 ms
16,568 KB
testcase_21 AC 48 ms
16,228 KB
testcase_22 AC 39 ms
14,772 KB
testcase_23 AC 41 ms
14,640 KB
testcase_24 AC 26 ms
10,664 KB
testcase_25 AC 38 ms
13,632 KB
testcase_26 AC 52 ms
15,180 KB
testcase_27 AC 53 ms
16,380 KB
testcase_28 AC 37 ms
13,192 KB
testcase_29 AC 94 ms
21,260 KB
testcase_30 AC 65 ms
18,428 KB
testcase_31 AC 35 ms
12,968 KB
testcase_32 AC 30 ms
10,760 KB
testcase_33 AC 43 ms
14,940 KB
testcase_34 AC 70 ms
18,160 KB
testcase_35 AC 49 ms
15,064 KB
testcase_36 AC 66 ms
18,704 KB
testcase_37 AC 88 ms
20,572 KB
testcase_38 AC 27 ms
10,656 KB
testcase_39 AC 47 ms
15,816 KB
testcase_40 AC 71 ms
16,492 KB
testcase_41 AC 17 ms
8,292 KB
testcase_42 AC 23 ms
9,872 KB
testcase_43 AC 15 ms
8,108 KB
testcase_44 AC 16 ms
7,736 KB
testcase_45 AC 15 ms
8,068 KB
testcase_46 AC 15 ms
8,052 KB
testcase_47 AC 15 ms
8,184 KB
testcase_48 AC 15 ms
7,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

seen = set([0])
curr = 0
for i in range(n):
    curr ^= A[i]
    temp = curr ^ k
    if temp in seen:
        print("Yes")
        exit()
    seen.add(curr)
print("No")
0