結果
| 問題 |
No.1674 Introduction to XOR
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-17 15:53:25 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 972 bytes |
| コンパイル時間 | 2,100 ms |
| コンパイル使用メモリ | 193,588 KB |
| 最終ジャッジ日時 | 2025-01-24 14:21:50 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>; using vvi = vector<vi>;
using vl = vector<ll>; using vvl = vector<vl>;
using vb = vector<bool>; using vvb = vector<vb>;
using vpi = vector<pii>; using vvpi = vector<vpi>;
using vpl = vector<pll>; using vvpl = vector<vpl>;
const int inf = 1 << 30;
const ll INF = 1LL << 60;
#define rep(i,m,n) for (int i = m; i < (int)(n); i++)
#define rrep(i,m,n) for (int i = m; i > (int)(n); i--)
int main(){
int n; cin >> n;
vl A(n);
rep(i,0,n){
cin >> A[i];
}
rep(i,0,62){
bool tf = true;
rep(j,0,n){
if (A[j]>>i & 1){
tf = false;
break;
}
}
if (tf){
ll ans = 1LL << i;
cout << ans << endl;
return 0;
}
}
}