結果

問題 No.1456 Range Xor
ユーザー 👑 NachiaNachia
提出日時 2021-03-31 21:59:08
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 2,500 ms
コンパイル使用メモリ 205,708 KB
実行使用メモリ 7,644 KB
最終ジャッジ日時 2023-08-22 01:43:36
合計ジャッジ時間 5,540 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,388 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 18 ms
4,380 KB
testcase_04 AC 23 ms
4,468 KB
testcase_05 AC 41 ms
6,300 KB
testcase_06 AC 19 ms
4,380 KB
testcase_07 AC 50 ms
6,888 KB
testcase_08 AC 35 ms
5,764 KB
testcase_09 AC 20 ms
4,384 KB
testcase_10 AC 25 ms
4,880 KB
testcase_11 AC 11 ms
4,380 KB
testcase_12 AC 5 ms
4,384 KB
testcase_13 AC 19 ms
4,972 KB
testcase_14 AC 10 ms
4,380 KB
testcase_15 AC 15 ms
4,376 KB
testcase_16 AC 24 ms
4,992 KB
testcase_17 AC 25 ms
5,520 KB
testcase_18 AC 7 ms
4,380 KB
testcase_19 AC 27 ms
5,408 KB
testcase_20 AC 27 ms
5,172 KB
testcase_21 AC 18 ms
4,500 KB
testcase_22 AC 13 ms
4,380 KB
testcase_23 AC 16 ms
4,724 KB
testcase_24 AC 7 ms
4,384 KB
testcase_25 AC 16 ms
4,796 KB
testcase_26 AC 28 ms
5,636 KB
testcase_27 AC 23 ms
5,004 KB
testcase_28 AC 14 ms
4,724 KB
testcase_29 AC 60 ms
7,644 KB
testcase_30 AC 29 ms
5,224 KB
testcase_31 AC 13 ms
4,500 KB
testcase_32 AC 11 ms
4,380 KB
testcase_33 AC 17 ms
4,764 KB
testcase_34 AC 36 ms
5,764 KB
testcase_35 AC 23 ms
5,152 KB
testcase_36 AC 28 ms
5,144 KB
testcase_37 AC 56 ms
7,584 KB
testcase_38 AC 8 ms
4,380 KB
testcase_39 AC 18 ms
4,384 KB
testcase_40 AC 38 ms
6,288 KB
testcase_41 AC 2 ms
4,380 KB
testcase_42 AC 7 ms
4,380 KB
testcase_43 AC 1 ms
4,380 KB
testcase_44 AC 2 ms
4,380 KB
testcase_45 AC 1 ms
4,376 KB
testcase_46 AC 2 ms
4,380 KB
testcase_47 AC 2 ms
4,380 KB
testcase_48 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ull=unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)

int N,K;
vector<int> A;

int main(){
  scanf("%d%d",&N,&K);
  A.resize(N+1);
  rep(i,N){ int a; scanf("%d",&a); A[i+1]=A[i]^a; }
  set<int> S;
  rep(i,N){
    S.insert(A[i]);
    if(S.count(A[i+1]^K)!=0){ printf("Yes\n"); return 0; }
  }
  printf("No\n");
  return 0;
}
0