#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const long long mod = 1e9 + 7;
long long p[200010];
long long c[200010];
long long d[200010];
int cmp(long long a, long long b) { return a > b; }
int check(int n, long long k) {
  int i;
  for (i = 1; i <= n; i++) d[i] = c[i];
  sort(d + 1, d + n + 1, cmp);
  long long now = 0;
  for (i = 1; i <= n; i++) now += p[i] / 100 * d[i];
  if (now >= k)
    return 1;
  else
    return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int test;
  cin >> test;
  while (test--) {
    int n;
    cin >> n;
    int i;
    for (i = 1; i <= n; i++) cin >> p[i];
    sort(p + 1, p + n + 1, cmp);
    long long x, y, a, b;
    cin >> x >> a >> y >> b;
    long long k;
    cin >> k;
    for (i = 1; i <= n; i++) {
      c[i] = 0;
      if (i % a == 0) c[i] += x;
      if (i % b == 0) c[i] += y;
    }
    int l = 1;
    int r = n + 1;
    while (l < r) {
      int mid = (l + r) >> 1;
      if (check(mid, k))
        r = mid;
      else
        l = mid + 1;
    }
    if (l == n + 1)
      cout << -1 << endl;
    else
      cout << l << endl;
  }
}
