#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
using ld = long double;
constexpr long long mod = 1e9 + 7;
constexpr long long Mod = 998244353;
constexpr long long MXN = 500000 + 100;
constexpr ld EPS = 1e-10;
constexpr ll inf = 3 * 1e18;
constexpr long long Inf = 15 * 1e8;
const vector<long long> dx{-1, 1, 0, 0}, dy{0, 0, -1, 1};
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
ll read() {
  ll u, k = scanf("%lld", &u);
  return u;
}
string reads() {
  string s;
  cin >> s;
  return s;
}
pair<long long, long long> readh(bool g = 0) {
  pair<long long, long long> u;
  long long k = scanf("%lld %lld", &u.first, &u.second);
  if (g) u.first--, u.second--;
  return u;
}
void printh(pair<long long, long long> t) {
  printf("%lld %lld\n", t.first, t.second);
}
bool inarea(pair<long long, long long> t, long long h, long long w) {
  return 0 <= t.first && t.first < h && 0 <= t.second && t.second < w;
}
ll gcd(ll i, ll j) { return j ? gcd(j, i % j) : i; }
ll lcm(ll i, ll j) { return i / gcd(i, j) * j; }
ll mod_pow(ll x, ll n, ll p = mod) {
  ll res = 1;
  x %= p;
  while (n > 0) {
    if (n & 1) res = res * x % p;
    x = x * x % p;
    n >>= 1;
  }
  return res;
}
ll bitcount(ll x) {
  long long sum = 0;
  for (long long i = 0; i < 60; i++)
    if ((1ll << i) & x) sum++;
  return sum;
}
long long n;
vector<long long> p;
long long x, a, y, b;
long long k;
bool solve(long long t) {
  long long u = 0, v = 0, r = 0;
  for (long long i = (0); i < ((t)); i++) {
    if ((i + 1) % a == 0 && (i + 1) % b == 0)
      u++;
    else if ((i + 1) % a == 0)
      v++;
    else if ((i + 1) % b == 0)
      r++;
  }
  long long sum = 0;
  for (long long i = (0); i < ((u)); i++) sum += p[i] / 100 * (x + y);
  for (long long i = (u); i < (u + v); i++) sum += p[i] / 100 * x;
  for (long long i = (u + v); i < (u + v + r); i++) sum += p[i] / 100 * y;
  return sum >= k;
}
signed main() {
  for (long long qq123_ = (read()); qq123_; qq123_--) {
    cin >> n;
    p.resize(n, 0);
    for (long long i = (0); i < (((n))); i++) p[i] = read();
    sort((p).begin(), (p).end(), greater<long long>());
    cin >> x >> a >> y >> b >> k;
    if (x < y) swap(x, y), swap(a, b);
    long long ok = n + 1, ng = 0, mid;
    while (abs(ok - ng) > 1) {
      mid = (ok + ng) / 2;
      if (solve(mid))
        ok = mid;
      else
        ng = mid;
    }
    if (ok == n + 1) ok = -1;
    cout << ok << endl;
  }
}
