結果

問題 No.2071 Shift and OR
ユーザー 👑 H20H20
提出日時 2022-09-16 22:02:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,790 ms / 2,000 ms
コード長 383 bytes
コンパイル時間 583 ms
コンパイル使用メモリ 87,392 KB
実行使用メモリ 105,024 KB
最終ジャッジ日時 2023-08-23 15:35:48
合計ジャッジ時間 62,581 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,790 ms
78,576 KB
testcase_01 AC 1,788 ms
78,788 KB
testcase_02 AC 1,788 ms
78,208 KB
testcase_03 AC 1,789 ms
78,228 KB
testcase_04 AC 1,789 ms
78,380 KB
testcase_05 AC 1,787 ms
78,320 KB
testcase_06 AC 1,787 ms
78,268 KB
testcase_07 AC 1,786 ms
78,568 KB
testcase_08 AC 1,790 ms
78,264 KB
testcase_09 AC 1,787 ms
78,136 KB
testcase_10 AC 1,787 ms
78,312 KB
testcase_11 AC 1,787 ms
78,492 KB
testcase_12 AC 1,788 ms
78,280 KB
testcase_13 AC 1,787 ms
78,556 KB
testcase_14 AC 1,788 ms
77,832 KB
testcase_15 AC 1,787 ms
78,356 KB
testcase_16 AC 1,788 ms
78,176 KB
testcase_17 AC 1,788 ms
78,480 KB
testcase_18 AC 1,788 ms
78,632 KB
testcase_19 AC 1,786 ms
78,332 KB
testcase_20 AC 1,788 ms
78,388 KB
testcase_21 AC 89 ms
71,944 KB
testcase_22 AC 1,788 ms
78,476 KB
testcase_23 AC 125 ms
101,844 KB
testcase_24 AC 95 ms
78,340 KB
testcase_25 AC 107 ms
87,692 KB
testcase_26 AC 108 ms
89,784 KB
testcase_27 AC 89 ms
76,288 KB
testcase_28 AC 127 ms
104,948 KB
testcase_29 AC 124 ms
105,024 KB
testcase_30 AC 1,786 ms
78,176 KB
testcase_31 AC 1,786 ms
78,316 KB
testcase_32 AC 1,786 ms
78,384 KB
testcase_33 AC 1,786 ms
78,196 KB
testcase_34 AC 1,785 ms
78,044 KB
testcase_35 AC 1,789 ms
78,044 KB
testcase_36 AC 1,787 ms
78,408 KB
testcase_37 AC 1,786 ms
78,328 KB
testcase_38 AC 1,786 ms
78,328 KB
testcase_39 AC 1,789 ms
78,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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