#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n;
int x, a, y, b;
long long L;
long long sum;
int c[N];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(int a, int b) { return a * 1LL * b / gcd(a, b); }
bool check(int k) {
  int c_a = k / a;
  int c_b = k / b;
  long long res = 0;
  int start = 0;
  int finish = k / L;
  for (int i = start; i < finish; ++i) {
    res += c[i] * 1LL * (x + y);
    --c_a;
    --c_b;
  }
  start = finish;
  finish = min(k, start + c_a);
  for (int i = start; i < finish; ++i) res += c[i] * 1LL * x;
  start = finish;
  finish = min(k, start + c_b);
  for (int i = start; i < finish; ++i) res += c[i] * 1LL * y;
  return res >= sum;
}
void solve() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", c + i);
    c[i] /= 100;
  }
  sort(c, c + n);
  reverse(c, c + n);
  scanf("%d%d", &x, &a);
  scanf("%d%d", &y, &b);
  if (x < y) {
    swap(x, y);
    swap(a, b);
  }
  L = lcm(a, b);
  scanf("%lld", &sum);
  int l = 0, r = n + 1, mid;
  while (r - l > 1) {
    mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  if (r == n + 1) r = -1;
  printf("%d\n", r);
}
int main() {
  int q;
  scanf("%d", &q);
  while (q--) solve();
}
