#include <bits/stdc++.h>
using namespace std;
const int maxn = int(2e5) + 100;
int n;
int p[maxn];
int x, y, a, b;
long long k, lcm;
int gcd(int b, int c) { return (c ? gcd(c, b % c) : b); }
void read() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &p[i]);
    p[i] /= 100;
  }
  scanf("%d%d", &x, &a);
  scanf("%d%d", &y, &b);
  scanf("%lld", &k);
}
bool check(int v) {
  int j = 0;
  long long ans = 0;
  for (long long i = lcm; i <= v; i += lcm) ans += 1LL * p[++j] * (x + y);
  int tmp = j;
  long long s = ans;
  {
    for (int i = a; i <= v; i += a)
      if (i % lcm) ans += 1LL * p[++j] * x;
    for (int i = b; i <= v; i += b)
      if (i % lcm) ans += 1LL * p[++j] * y;
  }
  {
    j = tmp;
    for (int i = b; i <= v; i += b)
      if (i % lcm) s += 1LL * p[++j] * y;
    for (int i = a; i <= v; i += a)
      if (i % lcm) s += 1LL * p[++j] * x;
    ans = max(ans, s);
  }
  return ans >= k;
}
void solve() {
  lcm = 1LL * a / gcd(a, b) * b;
  sort(p + 1, p + 1 + n, greater<int>());
  int L = 0, R = n + 1;
  while (L + 1 < R) {
    int mid = (L + R) >> 1;
    if (check(mid))
      R = mid;
    else
      L = mid;
  }
  printf("%d\n", (R > n ? -1 : R));
}
int main() {
  int casesum;
  scanf("%d", &casesum);
  while (casesum--) {
    read();
    solve();
  }
  return 0;
}
