import sys def main(): input = sys.stdin.read().split() ptr = 0 N = int(input[ptr]) ptr += 1 L = list(map(int, input[ptr:ptr+N])) ptr += N Q = int(input[ptr]) ptr += 1 K_list = list(map(int, input[ptr:ptr+Q])) ptr += Q L.sort(reverse=True) # Sort in descending order for early termination max_L = L[0] if N > 0 else 0 for K in K_list: if K == 0: print("0.0") continue low = 0.0 high = max_L * 2 # Initial high value to cover possible maximum # Perform binary search with sufficient iterations for precision for _ in range(100): mid = (low + high) / 2 if mid == 0: s = 0 else: s = 0 for l in L: s += l // mid if s >= K: break if s >= K: low = mid else: high = mid # Format the output to 15 decimal places print("{0:.15f}".format(low)) if __name__ == "__main__": main()