結果

問題 No.1456 Range Xor
ユーザー MtSakaMtSaka
提出日時 2021-03-13 14:12:35
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 423 bytes
コンパイル時間 3,144 ms
コンパイル使用メモリ 171,932 KB
実行使用メモリ 15,124 KB
最終ジャッジ日時 2023-08-20 20:18:09
合計ジャッジ時間 8,800 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 91 ms
10,920 KB
testcase_04 AC 87 ms
10,608 KB
testcase_05 AC 95 ms
11,288 KB
testcase_06 AC 89 ms
10,868 KB
testcase_07 AC 132 ms
14,168 KB
testcase_08 AC 107 ms
11,628 KB
testcase_09 AC 94 ms
11,176 KB
testcase_10 AC 90 ms
10,436 KB
testcase_11 AC 20 ms
5,728 KB
testcase_12 AC 9 ms
4,392 KB
testcase_13 AC 37 ms
7,556 KB
testcase_14 AC 28 ms
6,208 KB
testcase_15 AC 71 ms
9,536 KB
testcase_16 AC 63 ms
8,832 KB
testcase_17 AC 52 ms
8,976 KB
testcase_18 AC 24 ms
5,572 KB
testcase_19 AC 51 ms
7,944 KB
testcase_20 AC 76 ms
9,044 KB
testcase_21 AC 48 ms
7,664 KB
testcase_22 AC 53 ms
7,996 KB
testcase_23 AC 32 ms
6,596 KB
testcase_24 AC 17 ms
5,212 KB
testcase_25 AC 33 ms
6,984 KB
testcase_26 AC 61 ms
9,700 KB
testcase_27 AC 56 ms
8,220 KB
testcase_28 AC 28 ms
6,560 KB
testcase_29 AC 136 ms
15,124 KB
testcase_30 AC 85 ms
10,288 KB
testcase_31 AC 25 ms
6,280 KB
testcase_32 AC 21 ms
5,792 KB
testcase_33 AC 38 ms
7,368 KB
testcase_34 AC 84 ms
10,476 KB
testcase_35 AC 41 ms
7,224 KB
testcase_36 AC 86 ms
10,580 KB
testcase_37 AC 123 ms
14,648 KB
testcase_38 AC 17 ms
5,372 KB
testcase_39 AC 59 ms
8,632 KB
testcase_40 AC 87 ms
11,572 KB
testcase_41 AC 3 ms
4,380 KB
testcase_42 AC 12 ms
4,832 KB
testcase_43 AC 2 ms
4,376 KB
testcase_44 AC 2 ms
4,376 KB
testcase_45 AC 1 ms
4,376 KB
testcase_46 AC 2 ms
4,376 KB
testcase_47 AC 2 ms
4,380 KB
testcase_48 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define rep(i,s,n) for(int i=s;i<n;i++)
using namespace std;
using ll=long long;
int main(){
    int n,k;
    cin>>n>>k;
    ll a[n+1];
    map<ll,ll>b;
    a[0]=0;
    rep(i,1,n+1){
        cin>>a[i];
        a[i]^=a[i-1];
        b[a[i]^k]++;
    }
    rep(i,0,n+1){
        if(b[a[i]]>=1){
            cout<<"Yes"<<endl;
            return 0;
        }
    }
    cout<<"No"<<endl;
    return 0;
}
0