結果
| 問題 |
No.1674 Introduction to XOR
|
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2021-09-19 20:34:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 622 bytes |
| コンパイル時間 | 779 ms |
| コンパイル使用メモリ | 94,060 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-02 00:50:48 |
| 合計ジャッジ時間 | 1,694 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <queue>
#include <map>
#include <cmath>
#include <iomanip>
#include <cstdio>
using namespace std;
const int INF = 1001001001;
int main() {
int n;
cin >> n;
vector<long long> a(n);
long long sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum |= a[i];
}
long long x = 1;
for (int i = 0; i <= 60; i++) {
if (sum % 2 == 0) {
cout << x << endl;
return 0;
} else {
x *= 2LL;
sum /= 2LL;
}
}
return 0;
}
mmn15277198