結果

問題 No.1674 Introduction to XOR
ユーザー ぷらぷら
提出日時 2021-09-10 21:25:15
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 450 bytes
コンパイル時間 2,020 ms
コンパイル使用メモリ 192,896 KB
最終ジャッジ日時 2025-01-24 09:34:21
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    vector<int>tmp(61);
    for(int i = 0; i < N; i++) {
        long long A;
        cin >> A;
        for(int j = 0; j <= 60; j++) {
            if(1 & (A >> j)) {
                tmp[j] = 1;
            }
        }
    }
    for(int j = 0; j <= 60; j++) {
        if(tmp[j] == 0) {
            cout << (1LL << j) << endl;
            return 0;
        }
    }
}
0