結果
問題 | No.9 モンスターのレベル上げ |
ユーザー |
![]() |
提出日時 | 2024-03-12 15:44:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 767 ms / 5,000 ms |
コード長 | 274 bytes |
コンパイル時間 | 377 ms |
コンパイル使用メモリ | 82,920 KB |
実行使用メモリ | 78,860 KB |
最終ジャッジ日時 | 2024-09-29 22:20:49 |
合計ジャッジ時間 | 8,950 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
from heapq import* n=int(input()) a=[int(i)<<11 for i in input().split()] heapify(a) b=[*map(int,input().split())] m=2**11-1 r=1<<11 for i in range(n): h=a.copy() for j in range(-i,n-i):heappush(h,heappop(h)+(b[j]>>1<<11)+1) r=min(r,max(j&m for j in h)) print(r)