結果
| 問題 | 
                            No.183 たのしい排他的論理和(EASY)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-12-27 23:30:59 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 589 bytes | 
| コンパイル時間 | 794 ms | 
| コンパイル使用メモリ | 81,688 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-12-15 04:55:14 | 
| 合計ジャッジ時間 | 3,381 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 2 RE * 16 | 
ソースコード
#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[5200];
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 < 5003; j++) {
			if(d[j])d[a^j] = true;
		}
	}
	int s = 0;
	for (int i = 0; i < 5005; i++)
		if (d[i])s++;
	cout << s << endl;
	return 0;
}