結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー kakira9618kakira9618
提出日時 2015-04-17 00:27:08
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,430 bytes
コンパイル時間 1,869 ms
コンパイル使用メモリ 93,412 KB
実行使用メモリ 59,960 KB
最終ジャッジ日時 2023-09-17 16:25:33
合計ジャッジ時間 11,683 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 WA -
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 2 ms
4,380 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 369 ms
54,184 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>
 
#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
 
using namespace std;
 
typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;
 
const int INF=1<<29;
const double EPS=1e-9;
 
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
int main(int argc, char const *argv[]) {
	int N;
	cin >> N;

	std::vector<vector<long long int> > m(N, vector<long long int>(60, 0LL));
	for (int i = 0; i < N; ++i) {
		long long int temp;
		cin >> temp;
		for (int j = 0; j < 60; ++j) {
			m[i][j] = ((long long int)temp >> j & 1);
		}
	}

	set<string> se;
	
	for (int j = 0; j < 60; ++j) {
		string target = "";
		for (int i = 0; i < N; ++i) {
			string s;
			if (m[i][j] == 0) {
				s = "0";
			} else {
				s = "1";
			}
			target += s; 
		}
		//cout << target << endl;
		se.insert(target);
	}

	long long int ans = 1LL << (se.size() - 1);
	cout << ans << endl;

	return 0;
}
0