結果
| 問題 |
No.1674 Introduction to XOR
|
| コンテスト | |
| ユーザー |
Nachia
|
| 提出日時 | 2021-09-10 21:55:24 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 1,085 bytes |
| コンパイル時間 | 2,607 ms |
| コンパイル使用メモリ | 118,740 KB |
| 最終ジャッジ日時 | 2025-01-24 10:24:46 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <atcoder/segtree>
#include <atcoder/lazysegtree>
using namespace std;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;
#define rep(i,n) for(int i=0; i<(n); i++)
namespace RQ{
using S = int;
S e(){ return 1000000000; };
S op(S l, S r){ return 1000000000; };
using F = int;
S mapping(F f, S x){ if(f == -1) return x; return f; }
F composition(F f, F x){ if(f == -1) return x; return f; }
F id(){ return -1; }
using RQ = atcoder::lazy_segtree<S,op,e,F,mapping,composition,id>;
}
namespace RMQ{
using S = int;
S e(){ return 1000000000; };
S op(S l, S r){ return min(l,r); };
using RQ = atcoder::segtree<S,op,e>;
}
struct Query{ int l,r,q; };
int main(){
int N; cin >> N;
u64 ans = ~(u64)0;
rep(i,N){
u64 a; cin >> a;
ans &= ~a;
}
ans = ans & -ans;
cout << ans << endl;
return 0;
}
struct ios_do_not_sync {
ios_do_not_sync() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
}
} ios_do_not_sync_instance;
Nachia