結果
| 問題 |
No.1674 Introduction to XOR
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-10 21:33:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 475 bytes |
| コンパイル時間 | 1,601 ms |
| コンパイル使用メモリ | 168,560 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-11 22:38:48 |
| 合計ジャッジ時間 | 2,403 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, l, r) for (int i = (l); i < (r); i++)
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
vector<ll> A(N);
rep(i, 0, N) cin >> A[i];
rep(i, 0, 61) {
ll ans = 1LL << i;
rep(j, 0, N) {
if (ans & A[j]) {
ans = 0;
break;
}
}
if (ans) {
cout << ans << endl;
return 0;
}
}
}