#include <bits/stdc++.h>
using namespace std;
using lli = long long;
using lld = long double;
using ulli = unsigned long long int;
using pll = pair<lli, lli>;
using ttt = pair<lli, pll>;
using vttt = vector<ttt>;
using vll = vector<pll>;
using vl = vector<lli>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using cd = complex<lld>;
const double PI = acos(-1);
lli x, y, a, b, k;
bool check(vl& vect, int n) {
  lli ans = 0;
  vl val(n, 0);
  for (int i = a; i < n; i++) val[i] += x, i += a;
  for (int i = b; i < n; i++) val[i] += y, i += b;
  sort(val.begin(), val.end(), greater<lli>());
  for (int i = 0; i < n; i++) {
    ans += (val[i] * vect[i]);
    if (ans >= k) return 1;
  }
  return 0;
}
int tejas_919(int kkkk) {
  lli n, m, q, u, v, temp = 0, ans = 0;
  cin >> n;
  vl vect(n);
  for (int i = 0; i < n; i++) cin >> vect[i], vect[i] /= 100;
  sort(vect.begin(), vect.end(), greater<lli>());
  cin >> x >> a >> y >> b;
  a--;
  b--;
  cin >> k;
  if (!check(vect, n)) return cout << -1 << '\n', 0;
  int l = 0, r = n;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (check(vect, mid))
      r = mid;
    else
      l = mid;
  }
  cout << r << '\n';
  return 0;
}
signed main() {
  if (!0) {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  }
  cout << fixed << setprecision(10);
  int t = 1;
  cin >> t;
  for (int i = 0; i < t; i++) {
    tejas_919(i + 1);
  }
  {};
  if (0) system("pause");
}
