結果

問題 No.1456 Range Xor
ユーザー 👑 H20H20
提出日時 2021-04-01 13:34:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 528 ms
コンパイル使用メモリ 82,172 KB
実行使用メモリ 107,500 KB
最終ジャッジ日時 2024-05-09 22:59:32
合計ジャッジ時間 5,369 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,096 KB
testcase_01 AC 37 ms
51,584 KB
testcase_02 AC 37 ms
51,968 KB
testcase_03 AC 84 ms
106,880 KB
testcase_04 AC 84 ms
106,368 KB
testcase_05 AC 85 ms
106,368 KB
testcase_06 AC 85 ms
106,496 KB
testcase_07 AC 85 ms
106,752 KB
testcase_08 AC 85 ms
106,368 KB
testcase_09 AC 83 ms
107,500 KB
testcase_10 AC 83 ms
105,832 KB
testcase_11 AC 50 ms
68,352 KB
testcase_12 AC 45 ms
62,464 KB
testcase_13 AC 55 ms
73,600 KB
testcase_14 AC 54 ms
73,344 KB
testcase_15 AC 79 ms
100,124 KB
testcase_16 AC 75 ms
96,256 KB
testcase_17 AC 60 ms
79,616 KB
testcase_18 AC 53 ms
73,088 KB
testcase_19 AC 67 ms
88,832 KB
testcase_20 AC 73 ms
96,512 KB
testcase_21 AC 65 ms
87,808 KB
testcase_22 AC 67 ms
88,960 KB
testcase_23 AC 55 ms
75,264 KB
testcase_24 AC 47 ms
66,048 KB
testcase_25 AC 54 ms
72,192 KB
testcase_26 AC 63 ms
83,072 KB
testcase_27 AC 71 ms
92,160 KB
testcase_28 AC 51 ms
70,272 KB
testcase_29 AC 83 ms
101,376 KB
testcase_30 AC 84 ms
105,856 KB
testcase_31 AC 51 ms
69,120 KB
testcase_32 AC 49 ms
68,096 KB
testcase_33 AC 57 ms
76,928 KB
testcase_34 AC 83 ms
104,832 KB
testcase_35 AC 63 ms
82,944 KB
testcase_36 AC 84 ms
105,984 KB
testcase_37 AC 84 ms
100,992 KB
testcase_38 AC 49 ms
66,688 KB
testcase_39 AC 70 ms
93,184 KB
testcase_40 AC 73 ms
92,544 KB
testcase_41 AC 42 ms
59,648 KB
testcase_42 AC 45 ms
64,256 KB
testcase_43 AC 37 ms
51,968 KB
testcase_44 AC 37 ms
51,968 KB
testcase_45 AC 38 ms
51,968 KB
testcase_46 AC 37 ms
51,712 KB
testcase_47 AC 37 ms
51,968 KB
testcase_48 AC 37 ms
51,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
A = list(map(int,input().split()))
XORA = [A[0]]
for i in range(1,N):
    XORA.append(XORA[-1]^A[i])
SXORA = set(XORA)
if K in SXORA:
    print('Yes')
    exit()
TEMP = 0
for i in range(N):
    TEMP = TEMP ^ A[i]
    if K^TEMP in SXORA:
        print('Yes')
        exit()


print('No')
0