結果

問題 No.1674 Introduction to XOR
コンテスト
ユーザー Manuel1024
提出日時 2022-09-05 11:58:30
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
+ 317µs
コード長 418 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 317 ms
コンパイル使用メモリ 79,828 KB
実行使用メモリ 9,872 KB
最終ジャッジ日時 2026-09-27 00:24:27
合計ジャッジ時間 2,076 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>
using namespace std;
using ll = long long;

int main(){
    int n; cin >> n;
    vector<ll> a(n);
    for(auto &it: a) cin >> it;
    for(int i = 0; i < 62; i++){
        bool isok = true;
        for(auto &it: a){
            if((it >> i) & 1) isok = false;
        }
        if(isok){
            cout << (1LL << i) << endl;
            return 0;
        }
    }
    return 0;
}
0