結果
| 問題 |
No.1674 Introduction to XOR
|
| コンテスト | |
| ユーザー |
stoq
|
| 提出日時 | 2021-08-01 16:09:24 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 345 bytes |
| コンパイル時間 | 1,964 ms |
| コンパイル使用メモリ | 192,740 KB |
| 最終ジャッジ日時 | 2025-01-23 13:07:39 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ull = uint64_t;
int main() {
int n;
cin >> n;
ull t = (ull(1) << 63) - 1;
for (int i = 0; i < n; i++) {
ull a;
cin >> a;
t &= ~a;
}
for (int i = 0;; i++) {
if (t & (ull(1) << i)) {
cout << (ull(1) << i) << "\n";
return 0;
}
}
}
stoq