結果

問題 No.2071 Shift and OR
コンテスト
ユーザー H20
提出日時 2022-09-16 22:02:24
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 1,730 ms / 2,000 ms
コード長 383 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 901 ms
コンパイル使用メモリ 85,248 KB
実行使用メモリ 102,272 KB
最終ジャッジ日時 2026-05-28 10:03:18
合計ジャッジ時間 59,882 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from time import time
from random import shuffle

stime = time()
N = int(input())
A = list(map(int, input().split()))
if N >= 15:
    print(2**16-1)
    exit()
ans = 0
while stime+1.7 > time():
    v = 0
    nv = 0
    shuffle(A)
    for a in A:
        for i in range(16):
            nv = max(v|a,nv)
            a = a//2+2**15*(a%2)
        v = nv

    ans = max(v,ans)
print(ans)
0