結果

問題 No.1456 Range Xor
ユーザー kept1994kept1994
提出日時 2022-12-24 18:21:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 414 bytes
コンパイル時間 1,213 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 102,200 KB
最終ジャッジ日時 2023-08-11 12:34:22
合計ジャッジ時間 7,267 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,228 KB
testcase_01 AC 74 ms
71,448 KB
testcase_02 AC 76 ms
71,308 KB
testcase_03 AC 100 ms
91,868 KB
testcase_04 AC 101 ms
93,520 KB
testcase_05 AC 111 ms
99,804 KB
testcase_06 AC 101 ms
91,728 KB
testcase_07 AC 112 ms
102,200 KB
testcase_08 AC 104 ms
97,984 KB
testcase_09 AC 98 ms
92,452 KB
testcase_10 AC 102 ms
94,368 KB
testcase_11 AC 84 ms
78,764 KB
testcase_12 AC 80 ms
75,936 KB
testcase_13 AC 89 ms
82,204 KB
testcase_14 AC 84 ms
79,948 KB
testcase_15 AC 94 ms
88,828 KB
testcase_16 AC 98 ms
90,948 KB
testcase_17 AC 94 ms
86,644 KB
testcase_18 AC 85 ms
78,864 KB
testcase_19 AC 98 ms
89,836 KB
testcase_20 AC 98 ms
91,660 KB
testcase_21 AC 92 ms
86,880 KB
testcase_22 AC 92 ms
85,032 KB
testcase_23 AC 89 ms
82,512 KB
testcase_24 AC 83 ms
77,516 KB
testcase_25 AC 85 ms
81,296 KB
testcase_26 AC 98 ms
89,004 KB
testcase_27 AC 99 ms
89,620 KB
testcase_28 AC 85 ms
80,348 KB
testcase_29 AC 113 ms
101,936 KB
testcase_30 AC 103 ms
95,432 KB
testcase_31 AC 86 ms
79,504 KB
testcase_32 AC 84 ms
78,824 KB
testcase_33 AC 88 ms
83,068 KB
testcase_34 AC 107 ms
97,968 KB
testcase_35 AC 92 ms
86,276 KB
testcase_36 AC 105 ms
95,552 KB
testcase_37 AC 114 ms
101,760 KB
testcase_38 AC 83 ms
77,548 KB
testcase_39 AC 95 ms
87,564 KB
testcase_40 AC 109 ms
94,908 KB
testcase_41 AC 80 ms
75,988 KB
testcase_42 AC 80 ms
76,676 KB
testcase_43 AC 74 ms
71,236 KB
testcase_44 AC 75 ms
71,540 KB
testcase_45 AC 75 ms
71,308 KB
testcase_46 AC 75 ms
71,196 KB
testcase_47 AC 75 ms
71,476 KB
testcase_48 AC 75 ms
71,504 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