結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー Lay_ec
提出日時 2015-04-16 23:51:12
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 512 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 78,924 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-04 11:12:42
合計ジャッジ時間 3,005 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
#include <queue>
#include <stack>

using namespace std;


int main()
{
	int n;
	cin>>n;
	unsigned long long _or=0;
	for(int i=0;i<n;i++){
		unsigned long long a;
		cin>>a;
		_or|=a;
	}

	unsigned long long res=1;
	while(_or){
		if(_or%2) res*=2LL;
		_or/=2;
	}

	cout<<res<<endl;

	return 0;
}
0