#include using namespace std; typedef long long ll; const double EPS = 1e-9; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) int L[100010],D[100010]; double K[500010]; int main(){ int N; cin >> N; REP(i,N) cin >> L[i]; priority_queue > q; REP(i,N){ q.push(make_pair(L[i],i)); D[i] = 1; } REP(i,500001){ auto v = q.top(); q.pop(); int j = v.second; // index; double k = v.first; // L[j]/D[j] K[i+1] = k; D[j]++; q.push(make_pair(1.*L[j]/D[j],j)); } ll Q; cin >> Q; REP(i,Q){ int Ki; cin >> Ki; cout << fixed << setprecision(15) << K[Ki] << endl; } return 0; }