#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int q;
  cin >> q;
  while (q--) {
    int i, j, n, aux, cinf, csup, cmid;
    long long a, b, k, x, y, xy;
    vector<long long> pi;
    cin >> n;
    for (i = 0; i < n; i++) {
      cin >> aux;
      pi.push_back(aux);
    }
    sort(pi.begin(), pi.end(), greater<long long>());
    cin >> a >> x;
    cin >> b >> y;
    cin >> k;
    cinf = 1;
    csup = n;
    xy = x * y / gcd(x, y);
    int tea = n + 1;
    while (cinf <= csup) {
      cmid = (cinf + csup) / 2;
      int nxy = cmid / xy;
      int nx = cmid / x - nxy;
      int ny = cmid / y - nxy;
      long long res = 0;
      for (i = 0; i < nxy; i++) {
        res += (pi[i] / 100) * (a + b);
      }
      if (a > b) {
        for (j = 0; j < nx; i++, j++) {
          res += (pi[i] / 100) * a;
        }
        for (j = 0; j < ny; i++, j++) {
          res += (pi[i] / 100) * b;
        }
      } else {
        for (j = 0; j < ny; i++, j++) {
          res += (pi[i] / 100) * b;
        }
        for (j = 0; j < nx; i++, j++) {
          res += (pi[i] / 100) * a;
        }
      }
      if (res >= k) {
        tea = min(tea, cmid);
        csup = cmid - 1;
      } else {
        cinf = cmid + 1;
      }
    }
    if (tea > n) tea = -1;
    cout << tea << endl;
  }
}
