結果

問題 No.1456 Range Xor
ユーザー CleyLCleyL
提出日時 2022-05-07 11:02:24
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 757 ms
コンパイル使用メモリ 77,816 KB
実行使用メモリ 8,100 KB
最終ジャッジ日時 2023-09-20 20:06:23
合計ジャッジ時間 7,236 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 79 ms
8,084 KB
testcase_04 AC 69 ms
8,084 KB
testcase_05 AC 73 ms
7,992 KB
testcase_06 AC 76 ms
8,100 KB
testcase_07 AC 72 ms
8,032 KB
testcase_08 AC 71 ms
8,096 KB
testcase_09 AC 76 ms
8,056 KB
testcase_10 AC 71 ms
8,060 KB
testcase_11 AC 14 ms
4,384 KB
testcase_12 AC 6 ms
4,380 KB
testcase_13 AC 24 ms
4,824 KB
testcase_14 AC 22 ms
4,852 KB
testcase_15 AC 56 ms
7,136 KB
testcase_16 AC 56 ms
6,876 KB
testcase_17 AC 32 ms
5,388 KB
testcase_18 AC 20 ms
4,752 KB
testcase_19 AC 42 ms
6,156 KB
testcase_20 AC 54 ms
6,920 KB
testcase_21 AC 40 ms
6,112 KB
testcase_22 AC 44 ms
6,308 KB
testcase_23 AC 23 ms
4,988 KB
testcase_24 AC 11 ms
4,384 KB
testcase_25 AC 21 ms
4,616 KB
testcase_26 AC 37 ms
5,684 KB
testcase_27 AC 48 ms
6,552 KB
testcase_28 AC 18 ms
4,420 KB
testcase_29 AC 71 ms
7,468 KB
testcase_30 AC 71 ms
7,796 KB
testcase_31 AC 17 ms
4,616 KB
testcase_32 AC 14 ms
4,408 KB
testcase_33 AC 27 ms
5,144 KB
testcase_34 AC 73 ms
7,792 KB
testcase_35 AC 34 ms
5,624 KB
testcase_36 AC 70 ms
7,904 KB
testcase_37 AC 68 ms
7,316 KB
testcase_38 AC 12 ms
4,380 KB
testcase_39 AC 54 ms
6,672 KB
testcase_40 AC 50 ms
6,724 KB
testcase_41 AC 3 ms
4,380 KB
testcase_42 AC 8 ms
4,380 KB
testcase_43 AC 1 ms
4,380 KB
testcase_44 AC 1 ms
4,380 KB
testcase_45 AC 1 ms
4,380 KB
testcase_46 AC 2 ms
4,380 KB
testcase_47 AC 1 ms
4,384 KB
testcase_48 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <set>
using namespace std;
int main(){
  set<int> A;
  int n;cin>>n;
  int k;cin>>k;
  int nw = 0;
  A.insert(nw);
  for(int i = 0; n > i; i++){
    int x;cin>>x;
    nw ^= x;
    A.insert(nw);
  }
  for(auto x: A){
    if(A.count(x^k)){
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
0