#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector L(N); for(auto &l : L) cin >> l; sort(L.rbegin(),L.rend()); vector answer(500001); priority_queue> Q; int Log = 0,pos = 1; double now = L.at(0); vector use(N); Q.push({L.at(0)/2,0}); answer.at(++Log) = now,use.at(0) = 1; while(Log < 500000){ auto [next,u] = Q.top(); if(pos < N && next < L.at(pos)) next = L.at(pos),u = pos++; else Q.pop(); now = next; use.at(u)++; Q.push({L.at(u)/(1+use.at(u)),u}); answer.at(++Log) = now; } cout << fixed << setprecision(20); int q; cin >> q; while(q--){ int K; cin >> K; cout << answer.at(K) << "\n"; } }