#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18, MOD = 1e9 + 7, MAXN = 18, MAXM = 1e5 + 1;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
vector<long long> f;
long long a, b, x, y, n, k;
long long solve(long long m) {
  long long it = 0, res = 0;
  for (long long i = 0; i <= m; i++) {
    if ((i + 1) % a == 0 && (i + 1) % b == 0) {
      res += f[it] / 100 * (x + y);
      it++;
    }
  }
  for (long long i = 0; i <= m; i++) {
    if ((i + 1) % a == 0 && (i + 1) % b != 0) {
      res += f[it] / 100 * x;
      it++;
    }
  }
  for (long long i = 0; i <= m; i++) {
    if ((i + 1) % b == 0 && (i + 1) % a != 0) {
      res += f[it] / 100 * y;
      it++;
    }
  }
  return res;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long qw;
  cin >> qw;
  while (qw--) {
    cin >> n;
    f.clear();
    f.resize(n);
    for (long long i = 0; i < n; i++) {
      cin >> f[i];
    }
    sort((f).begin(), (f).end(), greater<long long>());
    cin >> x >> a;
    cin >> y >> b;
    cin >> k;
    if (x < y) {
      swap(x, y);
      swap(a, b);
    }
    long long l = -1, r = n;
    while (r - l > 1) {
      long long m = (l + r) / 2;
      if (solve(m) >= k) {
        r = m;
      } else
        l = m;
    }
    if (r < n) {
      cout << r + 1 << endl;
    } else {
      cout << -1 << endl;
    }
  }
}
