from heapq import heappush, heappop N = int(input()) L = list(map(int, input().split())) Q = int(input()) K = list(map(int, input().split())) q = [] for i, l in enumerate(L): heappush(q, (-l, i)) # (長さ, 棒の本数, 棒インデックス) kmax = max(K) ans = [0] * (kmax+1) cnts = [1] * N for i in range(1, kmax+1): l, p = heappop(q) ans[i] = -l cnts[p] += 1 heappush(q, (-L[p] / cnts[p], p)) for k in K: print(f'{ans[k]:.10f}')