結果
| 問題 | No.2071 Shift and OR |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-09-16 21:24:07 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 164 ms / 2,000 ms |
| + 216µs | |
| コード長 | 381 bytes |
| 記録 | |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 82,784 KB |
| 実行使用メモリ | 128,532 KB |
| 最終ジャッジ日時 | 2026-10-10 20:29:56 |
| 合計ジャッジ時間 | 4,405 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
n = int(input())
A = list(map(int, input().split()))
if n >= 16:
print((1 << 16) - 1)
exit()
se = {0}
for a in A:
nex = set()
cand = set()
for _ in range(16):
cand.add(a)
t = a & 1
a >>= 1
if t:
a |= 1 << 15
for a in cand:
for b in se:
nex.add(a | b)
se = nex
print(max(se))