結果
問題 |
No.9 モンスターのレベル上げ
|
ユーザー |
|
提出日時 | 2021-02-03 08:58:17 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 466 bytes |
コンパイル時間 | 150 ms |
コンパイル使用メモリ | 82,460 KB |
実行使用メモリ | 90,924 KB |
最終ジャッジ日時 | 2024-06-30 00:12:34 |
合計ジャッジ時間 | 19,402 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 14 |
ソースコード
import heapq N = int(input()) lsA = list(map(int,input().split())) lsB = list(map(int,input().split())) #N**2logN ans = float('INF') for st in range(N): h = [(i,0) for i in lsA] heapq.heapify(h) for i in range(N): lv,times = heapq.heappop(h) lv += lsB[(st+i)%2]//2 heapq.heappush(h,(lv,times+1)) cnt = 0 for i in range(N): lv,times = heapq.heappop(h) cnt = max(cnt,times) ans = min(cnt,ans) print(ans)