結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー dnishdnish
提出日時 2018-05-29 01:15:21
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 749 bytes
コンパイル時間 838 ms
コンパイル使用メモリ 87,648 KB
実行使用メモリ 10,616 KB
最終ジャッジ日時 2023-09-12 20:19:56
合計ジャッジ時間 7,794 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 3 ms
4,376 KB
testcase_03 AC 3 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 6 ms
4,464 KB
testcase_06 AC 2 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 <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define p(s) cout<<(s)<<endl
#define REP(i,n,N) for(int i=n;i<N;i++)
#define RREP(i,n,N) for(int i=N-1;i>=n;i--)
#define CK(n,a,b) ((a)<=(n)&&(n)<(b))
#define F first
#define S second
typedef long long ll;
using namespace std;

int N;
set<int> st{0};
int main(){
    cin>>N;
    REP(i,0,N){
        int a;
        cin>>a;
        int n = st.size();
        set<int> tmp = st;
        for(auto itr = tmp.begin(); itr!=tmp.end(); ++itr){
            st.insert(a^*itr);
        }
    }
    p(st.size());

    return 0;
}
0