結果
| 問題 |
No.1674 Introduction to XOR
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-10 22:40:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 884 bytes |
| コンパイル時間 | 1,907 ms |
| コンパイル使用メモリ | 170,252 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-12 01:53:57 |
| 合計ジャッジ時間 | 2,871 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
//#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
//using namespace atcoder;
using ll = long long;
#define all(A) A.begin(),A.end()
using vll = vector<ll>;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
using Graph = vector<vector<ll>>;
Graph G;
vll dist;
vector<bool> seen;
ll mod = 1e9 + 7;
ll inv(ll N) {
ll a = N, b = mod, c = 1, d = 0;
while (b > 0) {
ll t = a / b;
a -= t * b;
swap(a, b);
c -= t * d;
swap(c, d);
}
c %= mod;
if (c < 0)c += mod;
return c;
}
int main() {
ll N;
cin >> N;
vector<bool> K(70,true);
rep(i,N){
ll A;
cin>>A;
rep(j,70){
if(A%2!=0)K[j]=false;
A/=2;
}
}
rep(j,70){
if(K[j]){
cout<<(1ll<<j)<<endl;
return 0;
}
}
}