結果
問題 |
No.1674 Introduction to XOR
|
ユーザー |
|
提出日時 | 2024-03-21 11:31:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 493 bytes |
コンパイル時間 | 5,711 ms |
コンパイル使用メモリ | 250,600 KB |
最終ジャッジ日時 | 2025-02-20 10:35:08 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using ld = long double; int main() { int N; cin >> N; vector<ll> A(N); for (int i = 0; i < N; i++) cin >> A[i]; for (int i = 0;; i++) { ll t = 1LL << i; bool flag = true; for (int j = 0; j < N; j++) { if (t & A[j]) { flag = false; break; } } if (flag) { cout << t << endl; return 0; } } return 0; }