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, 1, i)) # (長さ, 棒の本数, 棒インデックス) kmax = max(K) ans = [0] * (kmax+1) for i in range(1, kmax+1): l, cnt, p = heappop(q) ans[i] = -l heappush(q, (-L[p] / (cnt+1), cnt+1, p)) for k in K: print(f'{ans[k]:.10f}')