結果
問題 | No.1674 Introduction to XOR |
ユーザー |
|
提出日時 | 2021-09-11 14:57:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 365 bytes |
コンパイル時間 | 2,209 ms |
コンパイル使用メモリ | 192,904 KB |
最終ジャッジ日時 | 2025-01-24 12:46:26 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using std::cin; using std::cout; using std::vector; using ll = long long; int main() { int n; cin >> n; vector<ll> a(n); rep(i, n) cin >> a[i]; ll s = 0; rep(i, n) s |= a[i]; rep(i, 61) { if ((s >> i & 1) == 0) { cout << (1ll << i) << '\n'; break; } } return 0; }