#include <bits/stdc++.h>
using namespace std;
void _in(long long *a, ...) {
  va_list arg_ptr;
  scanf("%I64d", a);
  long long *temp;
  va_start(arg_ptr, a);
  temp = va_arg(arg_ptr, long long *);
  while (temp) {
    scanf("%I64d", temp);
    temp = va_arg(arg_ptr, long long *);
  }
  va_end(arg_ptr);
}
void _in(int *a, ...) {
  va_list arg_ptr;
  scanf("%d", a);
  int *temp;
  va_start(arg_ptr, a);
  temp = va_arg(arg_ptr, int *);
  while (temp) {
    scanf("%d", temp);
    temp = va_arg(arg_ptr, int *);
  }
  va_end(arg_ptr);
}
const int N = 2e5 + 100;
long long P[N], n, x, a, y, b, k;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
bool cmp(int a, int b) { return a > b; }
bool check(long long qk) {
  long long abn = qk / lcm(a, b);
  long long an = qk / a - abn;
  long long bn = qk / b - abn;
  long long mon = 0, pt = 1;
  while (abn--) mon += P[pt++] / 100 * (x + y);
  if (x > y) {
    while (an--) mon += P[pt++] / 100 * x;
    while (bn--) mon += P[pt++] / 100 * y;
  } else {
    while (bn--) mon += P[pt++] / 100 * y;
    while (an--) mon += P[pt++] / 100 * x;
  }
  if (mon >= k)
    return 1;
  else
    return 0;
}
int main() {
  int T;
  _in(&T, 0);
  while (T--) {
    _in(&n, 0);
    for (int i = 1; i <= n; i++) {
      _in(&P[i], 0);
    }
    _in(&x, &a, 0);
    _in(&y, &b, 0);
    _in(&k, 0);
    sort(P + 1, P + n + 1, cmp);
    if (!check(n)) {
      printf("-1\n");
      continue;
    }
    long long l = 1, r = n + 1, mid, ans = r;
    while (l < r) {
      mid = (l + r) / 2;
      if (check(mid)) {
        ans = mid;
        r = mid;
      } else {
        l = mid + 1;
      }
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
