結果

問題 No.1456 Range Xor
ユーザー kept1994kept1994
提出日時 2022-12-24 18:21:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 414 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 94,976 KB
最終ジャッジ日時 2024-04-29 04:58:05
合計ジャッジ時間 4,904 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,036 KB
testcase_01 AC 40 ms
51,584 KB
testcase_02 AC 41 ms
51,584 KB
testcase_03 AC 73 ms
84,736 KB
testcase_04 AC 74 ms
86,016 KB
testcase_05 AC 82 ms
93,312 KB
testcase_06 AC 72 ms
84,608 KB
testcase_07 AC 83 ms
94,976 KB
testcase_08 AC 80 ms
91,392 KB
testcase_09 AC 73 ms
85,376 KB
testcase_10 AC 76 ms
87,040 KB
testcase_11 AC 53 ms
65,408 KB
testcase_12 AC 49 ms
61,312 KB
testcase_13 AC 58 ms
70,272 KB
testcase_14 AC 56 ms
68,352 KB
testcase_15 AC 68 ms
80,128 KB
testcase_16 AC 71 ms
82,176 KB
testcase_17 AC 65 ms
75,264 KB
testcase_18 AC 54 ms
66,816 KB
testcase_19 AC 68 ms
80,384 KB
testcase_20 AC 71 ms
82,944 KB
testcase_21 AC 64 ms
76,800 KB
testcase_22 AC 63 ms
75,264 KB
testcase_23 AC 58 ms
70,656 KB
testcase_24 AC 52 ms
64,256 KB
testcase_25 AC 56 ms
68,992 KB
testcase_26 AC 66 ms
78,336 KB
testcase_27 AC 67 ms
80,384 KB
testcase_28 AC 55 ms
67,712 KB
testcase_29 AC 86 ms
94,336 KB
testcase_30 AC 75 ms
87,808 KB
testcase_31 AC 54 ms
67,072 KB
testcase_32 AC 54 ms
65,664 KB
testcase_33 AC 60 ms
71,680 KB
testcase_34 AC 80 ms
90,112 KB
testcase_35 AC 65 ms
75,520 KB
testcase_36 AC 79 ms
87,808 KB
testcase_37 AC 86 ms
94,080 KB
testcase_38 AC 54 ms
64,512 KB
testcase_39 AC 71 ms
78,592 KB
testcase_40 AC 77 ms
85,760 KB
testcase_41 AC 48 ms
58,880 KB
testcase_42 AC 56 ms
62,464 KB
testcase_43 AC 44 ms
51,584 KB
testcase_44 AC 42 ms
51,456 KB
testcase_45 AC 40 ms
51,840 KB
testcase_46 AC 41 ms
51,584 KB
testcase_47 AC 40 ms
51,584 KB
testcase_48 AC 40 ms
51,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    last_xors = 0
    xors = set([last_xors])
    for aa in A:
        last_xors ^= aa
        target = last_xors ^ K
        if target in xors:
            print("Yes")
            return
        xors.add(last_xors)
    print("No")
    return
        
if __name__ == '__main__':
    main()
0