結果
問題 | No.1674 Introduction to XOR |
ユーザー |
![]() |
提出日時 | 2021-09-12 09:08:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 1,762 ms |
コンパイル使用メモリ | 166,160 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 21:10:30 |
合計ジャッジ時間 | 2,527 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include<bits/stdc++.h> using namespace std; const int N = 110; typedef unsigned long long ull; int n; ull a[N]; int main() { int n; scanf("%d",&n); ull x = 0; for(int i = 0;i < n;i ++ ) scanf("%llu",&a[i]), x |= a[i]; int t = 0; for(int i = 0;i <= 64;i ++ ) { if(((x >> i) & 1) == 0) { t = i; break; } } printf("%llu\n",1ull << t); }