結果

問題 No.1674 Introduction to XOR
ユーザー yunix91201367yunix91201367
提出日時 2021-09-10 22:10:48
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 969 bytes
コンパイル時間 2,827 ms
コンパイル使用メモリ 167,592 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-09-02 18:02:26
合計ジャッジ時間 2,754 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,368 KB
testcase_01 AC 2 ms
4,368 KB
testcase_02 AC 1 ms
4,372 KB
testcase_03 AC 1 ms
4,372 KB
testcase_04 AC 2 ms
4,372 KB
testcase_05 AC 1 ms
4,372 KB
testcase_06 AC 2 ms
4,368 KB
testcase_07 AC 1 ms
4,368 KB
testcase_08 AC 1 ms
4,368 KB
testcase_09 AC 2 ms
4,368 KB
testcase_10 AC 1 ms
4,372 KB
testcase_11 AC 2 ms
4,368 KB
testcase_12 AC 1 ms
4,372 KB
testcase_13 AC 1 ms
4,368 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 2 ms
4,372 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define int long long
using namespace std;
using vec_int = vector<int>;
using vec_ii = vector<vec_int>;
using vec_iii = vector<vec_ii>;
using vec_iiii = vector<vec_iii>;
using P = pair<int,int>;
using T = tuple<int,int,int, int>;
using ll = long long;
using ld = long double;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

void cout_line(vector<int> &a){
    for(int i=0;i<a.size();i++){
        if(i<a.size()-1){
            cout<<a.at(i)<<" ";
        }else{
            cout<<a.at(i)<<endl;
        }
    }
}

signed main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);

    int N; cin>>N;
    vec_int A(N); rep(i,N)cin>>A.at(i);
    for(int i=0;i<60;i++){
        int flag = 1;
        for(int j=0;j<N;j++){
            if((A.at(j)>>i)%2==1){
                flag= 0;
                break;
            }
        }
        if(flag==0)continue;
        cout<<((int)1<<i)<<endl;
        return 0;

    }


    return 0;
}
0