結果

問題 No.1456 Range Xor
ユーザー kpinkcatkpinkcat
提出日時 2023-09-05 16:13:40
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 561 bytes
コンパイル時間 2,258 ms
コンパイル使用メモリ 205,200 KB
実行使用メモリ 7,768 KB
最終ジャッジ日時 2023-09-05 16:13:48
合計ジャッジ時間 8,470 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 41 ms
4,376 KB
testcase_04 AC 46 ms
4,388 KB
testcase_05 AC 65 ms
6,360 KB
testcase_06 AC 43 ms
4,380 KB
testcase_07 AC 77 ms
6,868 KB
testcase_08 AC 59 ms
5,668 KB
testcase_09 AC 42 ms
4,380 KB
testcase_10 AC 49 ms
4,876 KB
testcase_11 AC 14 ms
4,380 KB
testcase_12 AC 7 ms
4,380 KB
testcase_13 AC 25 ms
4,920 KB
testcase_14 AC 17 ms
4,380 KB
testcase_15 AC 34 ms
4,376 KB
testcase_16 AC 42 ms
4,956 KB
testcase_17 AC 35 ms
5,324 KB
testcase_18 AC 14 ms
4,380 KB
testcase_19 AC 42 ms
5,476 KB
testcase_20 AC 44 ms
5,140 KB
testcase_21 AC 33 ms
4,552 KB
testcase_22 AC 28 ms
4,380 KB
testcase_23 AC 25 ms
4,788 KB
testcase_24 AC 12 ms
4,380 KB
testcase_25 AC 22 ms
4,920 KB
testcase_26 AC 39 ms
5,672 KB
testcase_27 AC 39 ms
4,872 KB
testcase_28 AC 19 ms
4,592 KB
testcase_29 AC 82 ms
7,768 KB
testcase_30 AC 50 ms
5,136 KB
testcase_31 AC 17 ms
4,580 KB
testcase_32 AC 14 ms
4,380 KB
testcase_33 AC 25 ms
4,608 KB
testcase_34 AC 58 ms
5,784 KB
testcase_35 AC 34 ms
4,976 KB
testcase_36 AC 52 ms
5,096 KB
testcase_37 AC 80 ms
7,328 KB
testcase_38 AC 12 ms
4,380 KB
testcase_39 AC 35 ms
4,408 KB
testcase_40 AC 57 ms
6,224 KB
testcase_41 AC 3 ms
4,384 KB
testcase_42 AC 8 ms
4,380 KB
testcase_43 WA -
testcase_44 AC 2 ms
4,380 KB
testcase_45 AC 2 ms
4,380 KB
testcase_46 AC 1 ms
4,384 KB
testcase_47 WA -
testcase_48 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
#include<string>
using namespace std;

int main()
{
    int n, k, t = 0;
    cin >> n >> k;
    set<int> st;
    vector<int> a(n); 
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < n; i++){
        t ^= a[i];
        st.insert(t);
        k ^= a[i];
        if(st.count(k)){
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;
}
0