結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー furafura
提出日時 2020-04-22 15:24:53
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 307 bytes
コンパイル時間 1,804 ms
コンパイル使用メモリ 195,548 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-19 15:00:59
合計ジャッジ時間 3,192 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 RE -
testcase_08 AC 61 ms
6,940 KB
testcase_09 AC 40 ms
6,940 KB
testcase_10 AC 53 ms
6,940 KB
testcase_11 AC 64 ms
6,944 KB
testcase_12 RE -
testcase_13 AC 1 ms
6,940 KB
testcase_14 AC 60 ms
6,940 KB
testcase_15 AC 67 ms
6,944 KB
testcase_16 AC 1 ms
6,944 KB
testcase_17 AC 16 ms
6,944 KB
testcase_18 RE -
testcase_19 AC 8 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	int n; scanf("%d",&n);
	vector<int> a(n);
	rep(i,n) scanf("%d",&a[i]);

	bool ok[1<<14]={true};
	rep(i,n) rep(x,1<<14) if(ok[x]) ok[x^a[i]]=true;

	printf("%ld\n",count(ok,ok+(1<<14),true));

	return 0;
}
0