結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー sggkshio
提出日時 2016-12-27 23:33:12
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 202 ms / 5,000 ms
コード長 592 bytes
コンパイル時間 1,078 ms
コンパイル使用メモリ 81,708 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-29 22:01:37
合計ジャッジ時間 3,299 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>

//#include<bits/stdc++.h>


using namespace std;

bool d[52000];
int main() {
	
	int n;
	cin >> n;
	d[0] = 1;
	for (int i = 0; i < n; i++) {
		int a;
		cin >> a;
		d[a] = true;
		for (int j = 0; j < 50000; j++) {
			if(d[j])d[a^j] = true;
		}
	}
	int s = 0;
	for (int i = 0; i < 50000; i++)
		if (d[i])s++;
	cout << s << endl;
	return 0;


}


0