#include <cassert>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <climits>
#include <map>
#include <queue>
#include <set>
#include <cstring>
#include <vector>

using namespace std;
typedef long long ll;

struct Node {
  int id;
  int cnt;
  double length;

  Node(int id = -1, int cnt = 0, double length = -1) {
    this->id = id;
    this->cnt = cnt;
    this->length = length;
  }

  bool operator>(const Node &n) const {
    return length < n.length;
  }
};

int main() {
  int N;
  cin >> N;
  int L[N];
  priority_queue <Node, vector<Node>, greater<Node>> pque;
  for (int i = 0; i < N; ++i) {
    cin >> L[i];
    pque.push(Node(i, 1, L[i]));
  }

  double ans[500001];
  for (int i = 1; i <= 500000; ++i) {
    Node node = pque.top();
    pque.pop();

    ans[i] = node.length;
    double new_length = L[node.id] * 1.0 / (node.cnt + 1);
    pque.push(Node(node.id, node.cnt + 1, new_length));
  }

  int Q;
  cin >> Q;
  for (int i = 0; i < Q; ++i) {
    int k;
    cin >> k;

    cout << fixed << setprecision(10) << ans[k] << endl;
  }

  return 0;
}