結果
問題 | No.9 モンスターのレベル上げ |
ユーザー |
|
提出日時 | 2014-11-05 21:35:32 |
言語 | Python2 (2.7.18) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 414 bytes |
コンパイル時間 | 309 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 12,032 KB |
最終ジャッジ日時 | 2024-12-30 17:48:55 |
合計ジャッジ時間 | 49,333 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 TLE * 1 |
ソースコード
import heapq from collections import deque n=input() a=map(int,raw_input().split())+[1e9] b=deque(map(int,raw_input().split())) max_list=[] for _ in range(n): pq=[(j,0) for j in a] heapq.heapify(pq) for elevel in b: level,cnt=heapq.heappop(pq) heapq.heappush(pq,(level+elevel/2,cnt+1)) max_list.append(max([y for x,y in pq])) b.rotate() print min(max_list)