#include <bits/stdc++.h>
bool comp(int x, int y) { return x > y; }
long long sum[200010];
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%lld", &sum[i]);
    std::sort(sum + 1, sum + 1 + n, comp);
    for (int i = 1; i <= n; i++) sum[i] += sum[i - 1];
    long long x, u, y, v;
    long long k;
    scanf("%lld%lld%lld%lld%lld", &u, &x, &v, &y, &k);
    long long z = gcd(x, y);
    int lb = 1, rb = n + 1;
    while (lb < rb) {
      int mb = (lb + rb) / 2;
      long long cur = 0;
      long long countUV = mb / (x / z * y);
      long long countU = mb / x - countUV, countV = mb / y - countUV;
      if (v > u)
        cur =
            sum[countUV] / 100 * (u + v) +
            (sum[countUV + countV] - sum[countUV]) / 100 * v +
            (sum[countUV + countU + countV] - sum[countUV + countV]) / 100 * u;
      else
        cur =
            sum[countUV] / 100 * (u + v) +
            (sum[countUV + countU] - sum[countUV]) / 100 * u +
            (sum[countUV + countU + countV] - sum[countUV + countU]) / 100 * v;
      if (cur >= k)
        rb = mb;
      else
        lb = mb + 1;
    }
    if (lb > n)
      printf("-1\n");
    else
      printf("%d\n", lb);
  }
  return 0;
}
