#include <bits/stdc++.h>
using namespace std;
const long long dir[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const long long dir2[8][2] = {{1, 1},  {1, 0},  {1, -1}, {0, 1},
                              {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};
long long n, k;
pair<long long, long long> aa, bb;
long long a[200001];
long long pct[200001];
long long pct2[200001];
long long ok(long long x) {
  long long cur = 0;
  long long i, j;
  for (i = 1; i <= x; i++) pct2[i] = pct[i];
  sort(pct2 + 1, pct2 + x + 1);
  for (i = x, j = n; i >= 1; i--, j--) cur += a[j] / 100 * pct2[i];
  if (cur >= k) return 1;
  return 0;
}
void wk() {
  long long i;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  cin >> aa.first >> aa.second;
  cin >> bb.first >> bb.second;
  cin >> k;
  sort(a + 1, a + n + 1);
  for (i = 1; i <= n; i++) pct[i] = 0;
  for (i = aa.second; i <= n; i += aa.second) pct[i] += aa.first;
  for (i = bb.second; i <= n; i += bb.second) pct[i] += bb.first;
  long long lo = 1, hi = n + 1, m;
  while (lo < hi) {
    m = (lo + hi) / 2;
    if (!ok(m))
      lo = m + 1;
    else
      hi = m;
  }
  if (lo <= n)
    cout << lo << endl;
  else
    cout << -1 << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long q;
  long long i;
  cin >> q;
  for (i = 1; i <= q; i++) wk();
  return 0;
}
