結果

問題 No.1674 Introduction to XOR
ユーザー monnu
提出日時 2021-09-16 20:19:42
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 305 bytes
コンパイル時間 1,485 ms
コンパイル使用メモリ 165,188 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-29 17:12:16
合計ジャッジ時間 2,384 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using Graph=vector<vector<int>>;
#define INF 1000000000

int main(){
  int N;
  cin>>N;
  ll sum=0;
  for(int i=0;i<N;i++){
    ll A;
    cin>>A;
    sum|=A;
  }

  int i=0;
  while(((sum>>i)&1)==1){
    i++;
  }
  cout<<(1LL<<i)<<'\n';
}
0