#include <bits/stdc++.h>
using namespace std;
long long q, n, p[200010], a, b, ptot[200010], k;
double x, y;
long long price(int r) {
  long long sum = 0;
  int xx, xy, yy;
  xx = xy = yy = 0;
  for (int i = 0; i <= r; i++) {
    i++;
    if (i % a == 0 && i % b == 0) xy++;
    if (i % a == 0) xx++;
    if (i % b == 0) yy++;
    i--;
  }
  xx -= xy;
  yy -= xy;
  for (int i = 0; i <= r; i++) {
    if (xy) {
      sum += p[i] * 0.01 * (x + y);
      xy--;
    } else if (xx) {
      sum += p[i] * 0.01 * x;
      xx--;
    } else if (yy) {
      sum += p[i] * 0.01 * y;
      yy--;
    }
    if (!xx && !yy && !xy) break;
  }
  return sum;
}
int main() {
  scanf("%lld", &q);
  while (q--) {
    scanf("%lld", &n);
    memset(ptot, 0, sizeof(ptot));
    for (int i = 0; i < n; i++) scanf("%lld", &p[i]);
    scanf("%lf%lld", &x, &a);
    scanf("%lf%lld", &y, &b);
    scanf("%lld", &k);
    if (x < y) {
      swap(x, y);
      swap(a, b);
    }
    sort(p, p + n);
    reverse(p, p + n);
    int l = 0, r = n;
    while (r - l > 10) {
      int mid = (l + r) / 2;
      long long tp = price(mid);
      if (tp <= k)
        l = mid;
      else if (tp > k)
        r = mid;
    }
    int i;
    for (i = l; i < r; i++) {
      if (price(i) >= k) break;
    }
    if (i < n)
      printf("%d\n", i + 1);
    else
      printf("-1\n");
  }
}
