#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e18;
const long long mod = (long long)1e9 + 7;
const double eps = (double)1e-9;
const double pi = acos(-1.0);
const int dx[] = {0, 0, 1, 0, -1};
const int dy[] = {0, 1, 0, -1, 0};
const int N = 100500;
int n, x, y, a, b, T;
long long k;
multiset<long long> st, st1;
long long check(int j) {
  st1 = st;
  long long ans = 0;
  for (int i = 1; i <= j; ++i)
    if (i % a == 0 && i % b == 0) {
      ans += *st1.begin() * (x + y);
      st1.erase(st1.begin());
    }
  for (int i = 1; i <= j; ++i)
    if (i % a == 0 && i % b != 0) {
      ans += *st1.begin() * x;
      st1.erase(st1.begin());
    }
  for (int i = 1; i <= j; ++i)
    if (i % b == 0 && i % a != 0) {
      ans += *st1.begin() * y;
      st1.erase(st1.begin());
    }
  return -ans;
}
void solve() {
  cin >> n;
  st.clear();
  for (int i = 1; i <= n; ++i) {
    long long x;
    cin >> x;
    st.insert(-x / 100);
  }
  cerr << st.size() << endl;
  cin >> x >> a >> y >> b >> k;
  if (x < y) swap(x, y), swap(a, b);
  int l = 1, r = n;
  while (l <= r) {
    int md = (l + r) >> 1;
    if (check(md) >= k)
      r = md - 1;
    else
      l = md + 1;
  }
  if (r == n) r = -2;
  cout << r + 1 << endl;
}
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >> T;
  while (T--) solve();
  return 0;
}
