#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const double PI = acos(-1.0);
const double epsilon = PI / 180.0;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int N = 2e5 + 10, M = 1e6 + 10;
int n, x, a, y, b;
long long p[N];
long long k;
bool cmp(long long a, long long b) { return a > b; }
int main() {
  int _;
  cin >> _;
  while (_--) {
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> p[i];
    cin >> x >> a;
    cin >> y >> b;
    if (y > x) swap(x, y), swap(a, b);
    cin >> k;
    sort(p + 1, p + 1 + n, cmp);
    for (int i = 1; i <= n; i++) {
      p[i] += p[i - 1];
    }
    int na = 0, nb = 0, m = 0;
    int ans = -1;
    for (int i = 1; i <= n; i++) {
      if (i % a == 0 && i % b == 0)
        m++;
      else if (i % a == 0)
        na++;
      else if (i % b == 0)
        nb++;
      long long res = (p[m] / 100) * (x + y) + (p[na + m] - p[m]) / 100 * x +
                      (p[na + m + nb] - p[na + m]) / 100 * y;
      if (res >= k) {
        ans = i;
        break;
      }
    }
    cout << ans << "\n";
  }
  return 0;
}
