結果

問題 No.1456 Range Xor
ユーザー DaYuanChiDaYuanChi
提出日時 2021-04-03 21:15:38
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 458 bytes
コンパイル時間 1,531 ms
コンパイル使用メモリ 172,484 KB
実行使用メモリ 8,732 KB
最終ジャッジ日時 2023-08-26 17:01:47
合計ジャッジ時間 4,909 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 71 ms
8,544 KB
testcase_04 AC 69 ms
8,548 KB
testcase_05 AC 72 ms
8,512 KB
testcase_06 AC 70 ms
8,556 KB
testcase_07 AC 83 ms
8,568 KB
testcase_08 AC 73 ms
8,508 KB
testcase_09 AC 70 ms
8,732 KB
testcase_10 AC 68 ms
8,564 KB
testcase_11 AC 14 ms
4,376 KB
testcase_12 AC 7 ms
4,380 KB
testcase_13 AC 25 ms
4,812 KB
testcase_14 AC 22 ms
4,804 KB
testcase_15 AC 57 ms
7,468 KB
testcase_16 AC 51 ms
7,232 KB
testcase_17 AC 35 ms
5,364 KB
testcase_18 AC 20 ms
4,736 KB
testcase_19 AC 41 ms
6,504 KB
testcase_20 AC 50 ms
7,036 KB
testcase_21 AC 38 ms
6,184 KB
testcase_22 AC 41 ms
6,552 KB
testcase_23 AC 24 ms
5,116 KB
testcase_24 AC 12 ms
4,380 KB
testcase_25 AC 22 ms
4,656 KB
testcase_26 AC 40 ms
5,612 KB
testcase_27 AC 46 ms
6,664 KB
testcase_28 AC 19 ms
4,464 KB
testcase_29 AC 83 ms
7,748 KB
testcase_30 AC 67 ms
8,272 KB
testcase_31 AC 18 ms
4,412 KB
testcase_32 AC 15 ms
4,376 KB
testcase_33 AC 29 ms
5,172 KB
testcase_34 AC 65 ms
8,020 KB
testcase_35 AC 33 ms
5,652 KB
testcase_36 AC 68 ms
8,284 KB
testcase_37 AC 77 ms
7,788 KB
testcase_38 AC 12 ms
4,376 KB
testcase_39 AC 48 ms
7,000 KB
testcase_40 AC 59 ms
6,928 KB
testcase_41 AC 2 ms
4,380 KB
testcase_42 AC 9 ms
4,380 KB
testcase_43 WA -
testcase_44 AC 1 ms
4,376 KB
testcase_45 AC 1 ms
4,380 KB
testcase_46 AC 1 ms
4,376 KB
testcase_47 WA -
testcase_48 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

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