結果
| 問題 | No.68 よくある棒を切る問題 (2) |
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2015-02-26 00:40:30 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 1,699 ms / 5,000 ms |
| + 255µs | |
| コード長 | 354 bytes |
| 記録 | |
| コンパイル時間 | 70 ms |
| コンパイル使用メモリ | 81,152 KB |
| 実行使用メモリ | 163,888 KB |
| 最終ジャッジ日時 | 2026-07-17 10:36:03 |
| 合計ジャッジ時間 | 24,108 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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]
yaoshimax