#include <bits/stdc++.h>
using namespace std;
const long long maxn = 3e5 + 7, mod = 998244353, inf = 1e18, MAXN = 1e6 + 7;
const double eps = 1e-9;
mt19937 rnd(time(0));
long long n, k;
long long cnt[maxn];
long long pref[maxn];
long long ptr1[maxn];
long long ptr2[maxn];
long long x, a, y, b;
long long get(long long l, long long r) {
  if (l > r) return 0;
  return pref[r + 1] - pref[l];
}
void solve() {
  cin >> n;
  for (long long i = 0; i <= n; ++i) ptr1[i] = ptr2[i] = pref[i] = 0;
  for (long long i = 0; i < n; ++i) {
    cin >> cnt[i];
  }
  sort(cnt, cnt + n);
  reverse(cnt, cnt + n);
  for (long long i = 0; i < n; ++i) pref[i + 1] = pref[i] + cnt[i];
  cin >> x >> a >> y >> b;
  cin >> k;
  for (long long i = a - 1; i < n; i += a) {
    ptr1[i] = 1;
  }
  for (long long i = b - 1; i < n; i += b) {
    ptr2[i] = 1;
  }
  long long A = 0, B = 0, AB = 0;
  for (long long i = 0; i < n; ++i) {
    if (ptr1[i] && ptr2[i])
      ++AB;
    else if (ptr1[i])
      ++A;
    else if (ptr2[i])
      ++B;
    long long add1 =
        get(AB, AB + A - 1) / 100 * x + get(AB + A, AB + A + B - 1) / 100 * y;
    long long add2 =
        get(AB, AB + B - 1) / 100 * y + get(AB + B, AB + A + B - 1) / 100 * x;
    long long ans = pref[AB] / 100 * (x + y) + max(add1, add2);
    if (ans >= k) {
      cout << i + 1 << '\n';
      return;
    }
  }
  cout << "-1\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(20);
  cout << fixed;
  long long t = 1;
  cin >> t;
  for (long long i = 0; i < t; ++i) {
    solve();
  }
  return 0;
}
