#include <bits/stdc++.h>
using namespace std;
long long n;
vector<long long> p;
long long x, a;
long long y, b;
long long k;
bool check(long long m) {
  long long ans = 0;
  vector<long long> kek(n);
  for (long long i = 0; i < m; i++) {
    if ((i + 1) % a == 0) kek[i] += x;
    if ((i + 1) % b == 0) kek[i] += y;
  }
  sort(kek.begin(), kek.end(), greater<long long>());
  for (long long i = 0; i < kek.size(); i++) {
    ans += p[i] * kek[i] / 100;
  }
  if (ans >= k) return true;
  return false;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long q;
  cin >> q;
  while (q--) {
    cin >> n;
    p.resize(n);
    for (long long i = 0; i < n; i++) {
      cin >> p[i];
    }
    cin >> x >> a;
    cin >> y >> b;
    cin >> k;
    sort(p.begin(), p.end(), greater<long long>());
    long long l, r, mid;
    l = 1;
    r = n;
    while (r - l > 1) {
      mid = (r + l) / 2;
      if (check(mid)) {
        r = mid;
      } else {
        l = mid;
      }
    }
    if (check(l)) {
      cout << l << "\n";
    } else if (check(r)) {
      cout << r << "\n";
    } else {
      cout << -1 << "\n";
    }
  }
  return 0;
}
