#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 7;
long long arr[N], c[101];
long long chk(long long n, long long a, long long x, long long b, long long y,
              long long k) {
  long long sum = 0;
  memset(c, 0, sizeof c);
  for (long long i = 1; i <= n; i++) {
    long long z = 0;
    if (i % a == 0) z += x;
    if (i % b == 0) z += y;
    c[z]++;
  }
  long long ptr = 1;
  for (long long i = 100; i >= 1; i--) {
    for (long long j = 1; j <= c[i]; j++) {
      sum += i * arr[ptr++];
      if (sum >= k) return 1;
    }
  }
  return 0;
}
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long q;
  cin >> q;
  while (q--) {
    long long n;
    cin >> n;
    for (long long i = 1; i <= n; i++) {
      cin >> arr[i];
      arr[i] /= 100;
    }
    sort(arr + 1, arr + n + 1, greater<long long>());
    long long x, a, y, b, k;
    cin >> x >> a >> y >> b >> k;
    long long l = 1, r = n, ans = -1;
    while (l <= r) {
      long long mid = (l + r) >> 1;
      if (chk(mid, a, x, b, y, k))
        r = mid - 1, ans = mid;
      else
        l = mid + 1;
    }
    cout << ans << endl;
  }
}
