#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int Q;
  cin >> Q;
  while (Q--) {
    int n;
    cin >> n;
    vector<long long> w(n);
    vector<long long> p(n);
    for (int i = 0; i < n; ++i) cin >> p[i], p[i] /= 100;
    sort(p.rbegin(), p.rend());
    long long x, a, y, b;
    cin >> x >> a >> y >> b;
    for (int i = a - 1; i < n; i += a) {
      w[i] += x;
    }
    for (int i = b - 1; i < n; i += b) {
      w[i] += y;
    }
    long long k;
    cin >> k;
    int l = 0, r = n + 1;
    while (r - l > 1) {
      int m = l + r >> 1;
      vector<long long> ch;
      for (int i = 0; i < m; ++i) ch.push_back(w[i]);
      sort(ch.rbegin(), ch.rend());
      long long cur = 0;
      for (int i = 0; i < m; ++i) cur += ch[i] * p[i];
      (cur >= k ? r : l) = m;
    }
    if (r == n + 1)
      cout << -1 << '\n';
    else
      cout << r << '\n';
  }
}
