#include <bits/stdc++.h>
using namespace std;
int p[200004];
long long sump[200004];
long long n, x, y, a, b, lab;
long long k;
int ans = 0;
int gcd(int a1, int a2) {
  if (!a2) return a1;
  return gcd(a2, a1 % a2);
}
bool lower(int m) {
  int na = m / a;
  int nb = m / b;
  int nab = m / lab;
  na -= nab, nb -= nab;
  long long sum = 0;
  sum += (sump[nab] / 100) * (x + y);
  sum += ((sump[nab + na] - sump[nab]) / 100) * x;
  sum += ((sump[nab + na + nb] - sump[nab + na]) / 100) * y;
  if (sum < k) return 1;
  return 0;
}
void bs(int l, int r) {
  while (l <= r) {
    int mid = (l + r) / 2;
    if (lower(mid)) {
      l = mid + 1;
    } else {
      ans = min(ans, mid);
      r = mid - 1;
    }
  }
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> p[i];
    cin >> x >> a;
    cin >> y >> b;
    cin >> k;
    if (x < y) swap(x, y), swap(a, b);
    sort(p + 1, p + 1 + n, greater<int>());
    sump[0] = 0;
    for (int i = 1; i <= n; i++) sump[i] = sump[i - 1] + p[i];
    lab = (a * b) / gcd(a, b);
    ans = n + 1;
    bs(1, n);
    if (ans == n + 1)
      cout << -1 << endl;
    else
      printf("%d\n", ans);
  }
  return 0;
}
