結果
| 問題 | No.184 たのしい排他的論理和(HARD) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-01 01:00:04 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 527 bytes |
| 記録 | |
| コンパイル時間 | 1,327 ms |
| コンパイル使用メモリ | 162,684 KB |
| 実行使用メモリ | 30,592 KB |
| 最終ジャッジ日時 | 2024-07-04 12:09:09 |
| 合計ジャッジ時間 | 3,766 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n,b[61] = {};
unsigned long long tmp;
cin >> n;
vector< vector<int> > m(n, vector<int>(61, 0));
for (int i = 0; i < n; i++) {
cin >> tmp;
for(int j = 0; j < 62; j++) {
m[i][j] = (tmp >> j) & 1;
if (m[i][j]) b[j] = 1;
}
}
int c = count(b, b + 62, 1);
unsigned long long ans = 1LL << min(c, n);
cout << ans << "\n";
return 0;
}