#include using namespace std; int main() { int N, L[100010]; cin >> N; for (int i = 0; i < N; i++) { cin >> L[i]; } priority_queue> que; for (int i = 0; i < N; i++) { que.push({(double)L[i], L[i], 1}); } double memo[500010] = {}; for (int i = 1; i <= 500000; i++) { auto t = que.top(); que.pop(); memo[i] = get<0>(t); get<2>(t) += 1; get<0>(t) = (double)get<1>(t) / get<2>(t); que.push(t); } int Q; cin >> Q; cout << fixed << setprecision(10); while (Q--) { int K; cin >> K; cout << memo[K] << endl; } }