結果
| 問題 |
No.1674 Introduction to XOR
|
| コンテスト | |
| ユーザー |
goteten
|
| 提出日時 | 2021-09-10 21:37:53 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 514 bytes |
| コンパイル時間 | 1,906 ms |
| コンパイル使用メモリ | 169,236 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-11 22:50:55 |
| 合計ジャッジ時間 | 2,079 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(),(x).end()
const int mod = 1000000007;
const long long INF = 1LL << 60;
int main()
{
int N;
cin >> N;
vector<long long> a(N);
rep(i,N){
cin >> a[i];
}
vector<int> keta(64,0);
rep(i,N){
rep(j,62){
keta[j]+=a[i]%2;
a[i]/=2;
}
}
long long ans=1;
rep(i,64){
if(keta[i]==0){
cout << ans << endl;
return 0;
}
ans*=2LL;
}
}
goteten