#include #define show(x) std::cerr << #x << " = " << x << std::endl using ll = long long; using ld = long double; int main() { int N; std::cin >> N; std::vector L(N); for (int i = 0; i < N; i++) { std::cin >> L[i]; } int Q; std::vector ans(500001); using P = std::pair; std::priority_queue

q; for (int i = 0; i < N; i++) { q.push({L[i], 1}); } for (int cnt = 1; cnt <= 500000; cnt++) { const auto p = q.top(); q.pop(), ans[cnt] = p.first, q.push({p.first * p.second / (p.second + 1), p.second + 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; }