結果

問題 No.1456 Range Xor
ユーザー nasubi24nasubi24
提出日時 2021-03-31 21:10:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 87,216 KB
実行使用メモリ 113,900 KB
最終ジャッジ日時 2023-08-21 21:28:02
合計ジャッジ時間 9,143 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
71,276 KB
testcase_01 AC 95 ms
71,580 KB
testcase_02 AC 93 ms
71,684 KB
testcase_03 AC 128 ms
94,032 KB
testcase_04 AC 130 ms
96,852 KB
testcase_05 AC 148 ms
106,092 KB
testcase_06 AC 127 ms
94,116 KB
testcase_07 AC 156 ms
109,700 KB
testcase_08 AC 144 ms
102,928 KB
testcase_09 AC 128 ms
95,260 KB
testcase_10 AC 136 ms
98,288 KB
testcase_11 AC 114 ms
81,404 KB
testcase_12 AC 106 ms
78,372 KB
testcase_13 AC 119 ms
85,480 KB
testcase_14 AC 111 ms
81,632 KB
testcase_15 AC 119 ms
91,124 KB
testcase_16 AC 127 ms
95,212 KB
testcase_17 AC 124 ms
91,124 KB
testcase_18 AC 112 ms
80,332 KB
testcase_19 AC 131 ms
94,292 KB
testcase_20 AC 133 ms
96,252 KB
testcase_21 AC 122 ms
90,128 KB
testcase_22 AC 120 ms
87,536 KB
testcase_23 AC 118 ms
86,096 KB
testcase_24 AC 109 ms
79,656 KB
testcase_25 AC 119 ms
84,024 KB
testcase_26 AC 131 ms
94,120 KB
testcase_27 AC 129 ms
93,876 KB
testcase_28 AC 114 ms
83,056 KB
testcase_29 AC 167 ms
113,900 KB
testcase_30 AC 137 ms
99,448 KB
testcase_31 AC 112 ms
82,116 KB
testcase_32 AC 112 ms
81,100 KB
testcase_33 AC 121 ms
86,648 KB
testcase_34 AC 150 ms
103,080 KB
testcase_35 AC 125 ms
90,348 KB
testcase_36 AC 135 ms
99,744 KB
testcase_37 AC 166 ms
113,456 KB
testcase_38 AC 109 ms
79,756 KB
testcase_39 AC 121 ms
90,556 KB
testcase_40 AC 140 ms
100,896 KB
testcase_41 AC 103 ms
77,776 KB
testcase_42 AC 107 ms
79,072 KB
testcase_43 AC 94 ms
71,420 KB
testcase_44 AC 94 ms
71,572 KB
testcase_45 AC 94 ms
71,680 KB
testcase_46 AC 95 ms
71,684 KB
testcase_47 AC 96 ms
71,468 KB
testcase_48 AC 96 ms
71,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
n,k=map(int,input().split())
a=list(map(int,input().split()))
d=defaultdict(int)
cnt=0
d[str(0)]=1
for i in range(n):
    cnt^=a[i]
    if d.get(str(cnt^k))==1:
        print("Yes")
        break
    d[str(cnt)]=1
else:
    print("No")
0