#include <bits/stdc++.h>
using namespace std;
int n, a, b;
long long s[2 * 100000 + 5], x, y, k;
bool c(long long x1, long long x2) { return x1 > x2; }
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long lcm(long long x, long long y) { return x * y / gcd(x, y); }
long long solve(int len) {
  int n1 = len / a, n2 = len / b, n3 = len / lcm(a, b);
  n1 -= n3;
  n2 -= n3;
  long long back = 0;
  for (int i = 1; i <= n3; i++) back += s[i] / 100 * (x + y);
  for (int i = n3 + 1; i <= n3 + n1; i++) back += s[i] / 100 * x;
  for (int i = n3 + n1 + 1; i <= n3 + n1 + n2; i++) back += s[i] / 100 * y;
  return back;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int q;
  cin >> q;
  while (q--) {
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> s[i];
    sort(s + 1, s + n + 1, c);
    cin >> x >> a >> y >> b;
    if (x < y) {
      swap(x, y);
      swap(a, b);
    }
    cin >> k;
    int l = 1, r = n, m;
    while (r - l > 1) {
      m = (l + r) / 2;
      if (solve(m) >= k)
        r = m;
      else
        l = m;
    }
    if (solve(l) >= k)
      cout << l << '\n';
    else if (solve(r) >= k)
      cout << r << '\n';
    else
      cout << -1 << '\n';
  }
}
