結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー itezpace
提出日時 2016-07-24 17:41:25
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 720 ms
コンパイル使用メモリ 69,092 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-06 15:56:35
合計ジャッジ時間 1,588 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 2 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <set>
using namespace std;

int main(){
  int n,a;
  cin>>n;
  vector<int> v;
  for(int i=0; i<n; ++i){
    cin>>a;
    v.push_back(a);
  }
  int b;
  b=0;
  set<int> s;
  s.insert(0);
  for(int i=0; i<n; ++i){
    b^=v[i];
    s.insert(b);
  }
  int c;
  for(int i=0; i<n; ++i){
    c=0;
    c^=v[i];
    s.insert(c);
  }
  cout<<s.size()<<endl;
  return 0;
}
0