結果
| 問題 | No.68 よくある棒を切る問題 (2) | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2014-11-25 13:33:52 | 
| 言語 | Python2 (2.7.18) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2,586 ms / 5,000 ms | 
| コード長 | 282 bytes | 
| コンパイル時間 | 501 ms | 
| コンパイル使用メモリ | 7,040 KB | 
| 実行使用メモリ | 52,740 KB | 
| 最終ジャッジ日時 | 2025-01-02 21:39:55 | 
| 合計ジャッジ時間 | 36,341 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
ソースコード
import heapq
n=input()
l=[(-float(i),1) for i in raw_input().split()]
q=input()
heapq.heapify(l)
a=[]
for _ in range(500000):
    s,n=heapq.heappop(l)
    a.append(s)
    heapq.heappush(l,(s*n/(n+1),n+1))
for i in map(int,raw_input().split()):
    print -a[i-1]
            
            
            
        