#include using ll = long long; using ld = long double; struct F { ll a, b; }; bool operator<(const F& f1, const F& f2) { return f1.a * f2.b < f1.b * f2.a; } int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); int N; std::cin >> N; std::priority_queue q; for (int i = 0, L; i < N; i++) { std::cin >> L, q.push({L, 1}); } int Q; std::vector ans(500001); for (int cnt = 1; cnt <= 500000; cnt++) { const auto p = q.top(); q.pop(), ans[cnt] = p.a * 1.0 / p.b, q.push({p.a, p.b + 1}); } std::cin >> Q; for (int q = 0, K; q < Q; q++) { std::cin >> K, std::cout << std::fixed << std::setprecision(15) << ans[K] << "\n"; } return 0; }