結果
| 問題 | No.68 よくある棒を切る問題 (2) | 
| コンテスト | |
| ユーザー |  yaoshimax | 
| 提出日時 | 2015-02-26 00:40:30 | 
| 言語 | Python2 (2.7.18) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2,370 ms / 5,000 ms | 
| コード長 | 354 bytes | 
| コンパイル時間 | 56 ms | 
| コンパイル使用メモリ | 7,040 KB | 
| 実行使用メモリ | 55,752 KB | 
| 最終ジャッジ日時 | 2024-06-23 23:46:12 | 
| 合計ジャッジ時間 | 32,628 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
ソースコード
from heapq import heappush, heappop
N=int(raw_input())
L=map(int,raw_input().split())
ans = [0.0 for i in xrange(500001)]
hp=[]
for l in L:
    heappush(hp,(-l,l,1))
for i in range(1,500001):
    (a,bar,n)=heappop(hp)
    ans[i]=-a
    heappush(hp,(-bar/(n+1.0),bar,n+1))
Q=int(raw_input())
K=map(int,raw_input().split())
for k in K:
    print ans[k]
            
            
            
        