結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー fuu32fuu32
提出日時 2018-02-05 14:15:01
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 557 bytes
コンパイル時間 2,427 ms
コンパイル使用メモリ 172,228 KB
実行使用メモリ 9,372 KB
最終ジャッジ日時 2023-09-21 21:46:54
合計ジャッジ時間 9,458 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 5 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define LOOP(i,x,n) for(int i=x;i<n;i++)
#define ALL(v) (v).begin(),(v).end()
#define PB push_backs
#define MP make_pair
#define FR first
#define SC second
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

signed main(){
  int n;
  cin>>n;
  vector<int> a(n);
  REP(i,n)cin>>a[i];
  set<int> s;
  s.insert(0);
  REP(i,n){
    for(auto x : s){
      int tmp=(0)xor(x)xor(a[i]);
      s.insert(tmp);
    }
  }
  cout<<s.size()<<endl;
    return 0;
}
0