結果

問題 No.1456 Range Xor
ユーザー netyo715netyo715
提出日時 2021-03-31 21:23:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 1,150 ms
コンパイル使用メモリ 10,848 KB
実行使用メモリ 22,188 KB
最終ジャッジ日時 2023-08-21 23:02:13
合計ジャッジ時間 7,578 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,228 KB
testcase_01 AC 15 ms
8,052 KB
testcase_02 AC 15 ms
7,768 KB
testcase_03 AC 71 ms
18,852 KB
testcase_04 AC 79 ms
18,928 KB
testcase_05 AC 95 ms
18,948 KB
testcase_06 AC 72 ms
18,808 KB
testcase_07 AC 104 ms
18,928 KB
testcase_08 AC 91 ms
18,808 KB
testcase_09 AC 73 ms
18,836 KB
testcase_10 AC 83 ms
18,812 KB
testcase_11 AC 32 ms
10,996 KB
testcase_12 AC 23 ms
9,672 KB
testcase_13 AC 48 ms
14,292 KB
testcase_14 AC 36 ms
11,484 KB
testcase_15 AC 60 ms
17,000 KB
testcase_16 AC 72 ms
17,812 KB
testcase_17 AC 58 ms
15,420 KB
testcase_18 AC 33 ms
12,080 KB
testcase_19 AC 67 ms
16,652 KB
testcase_20 AC 72 ms
17,580 KB
testcase_21 AC 60 ms
16,500 KB
testcase_22 AC 52 ms
15,024 KB
testcase_23 AC 49 ms
15,136 KB
testcase_24 AC 30 ms
10,796 KB
testcase_25 AC 44 ms
13,932 KB
testcase_26 AC 64 ms
15,324 KB
testcase_27 AC 67 ms
16,872 KB
testcase_28 AC 41 ms
13,508 KB
testcase_29 AC 108 ms
22,188 KB
testcase_30 AC 81 ms
18,480 KB
testcase_31 AC 39 ms
13,124 KB
testcase_32 AC 33 ms
10,720 KB
testcase_33 AC 49 ms
15,232 KB
testcase_34 AC 88 ms
18,084 KB
testcase_35 AC 59 ms
15,680 KB
testcase_36 AC 82 ms
18,800 KB
testcase_37 AC 105 ms
22,032 KB
testcase_38 AC 30 ms
10,908 KB
testcase_39 AC 60 ms
15,924 KB
testcase_40 AC 81 ms
16,836 KB
testcase_41 AC 17 ms
8,492 KB
testcase_42 AC 25 ms
9,848 KB
testcase_43 AC 15 ms
8,028 KB
testcase_44 AC 15 ms
7,820 KB
testcase_45 AC 15 ms
8,240 KB
testcase_46 AC 15 ms
8,220 KB
testcase_47 AC 15 ms
8,212 KB
testcase_48 AC 15 ms
7,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

b = [A[0]]
for i in range(1, N):
    b.append(b[-1]^A[i])

s = set()
for i in range(N):
    if b[i] == K:
        print("Yes")
        exit()
    if K^b[i] in s:
        print("Yes")
        exit()
    s.add(b[i])

else:
    print("No")
0