結果

問題 No.2071 Shift and OR
ユーザー H20H20
提出日時 2022-09-16 22:02:24
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 1,795 ms / 2,000 ms
コード長 383 bytes
コンパイル時間 561 ms
使用メモリ 112,196 KB
最終ジャッジ日時 2023-01-11 07:02:08
合計ジャッジ時間 62,136 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 1,794 ms
82,536 KB
testcase_01 AC 1,790 ms
82,652 KB
testcase_02 AC 1,791 ms
83,268 KB
testcase_03 AC 1,792 ms
82,816 KB
testcase_04 AC 1,792 ms
82,824 KB
testcase_05 AC 1,794 ms
82,788 KB
testcase_06 AC 1,792 ms
82,640 KB
testcase_07 AC 1,794 ms
83,272 KB
testcase_08 AC 1,793 ms
82,840 KB
testcase_09 AC 1,791 ms
82,804 KB
testcase_10 AC 1,791 ms
82,796 KB
testcase_11 AC 1,795 ms
82,724 KB
testcase_12 AC 1,791 ms
83,024 KB
testcase_13 AC 1,793 ms
82,684 KB
testcase_14 AC 1,792 ms
82,784 KB
testcase_15 AC 1,794 ms
82,700 KB
testcase_16 AC 1,792 ms
82,684 KB
testcase_17 AC 1,791 ms
82,880 KB
testcase_18 AC 1,793 ms
82,880 KB
testcase_19 AC 1,794 ms
82,656 KB
testcase_20 AC 1,793 ms
82,716 KB
testcase_21 AC 90 ms
76,584 KB
testcase_22 AC 1,791 ms
83,304 KB
testcase_23 AC 129 ms
108,772 KB
testcase_24 AC 96 ms
82,800 KB
testcase_25 AC 109 ms
93,264 KB
testcase_26 AC 111 ms
94,888 KB
testcase_27 AC 93 ms
81,256 KB
testcase_28 AC 132 ms
112,168 KB
testcase_29 AC 131 ms
112,196 KB
testcase_30 AC 1,789 ms
82,796 KB
testcase_31 AC 1,790 ms
83,076 KB
testcase_32 AC 1,795 ms
82,840 KB
testcase_33 AC 1,793 ms
82,728 KB
testcase_34 AC 1,793 ms
82,696 KB
testcase_35 AC 1,791 ms
83,196 KB
testcase_36 AC 1,793 ms
82,700 KB
testcase_37 AC 1,792 ms
83,268 KB
testcase_38 AC 1,791 ms
82,736 KB
testcase_39 AC 1,791 ms
82,696 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