#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
const int MAXM = 1000005;
const int MOD = 1000000007;
const int MAMOD = 998244353;
const int INF = 0x3f3f3f3f;
const long long LLINF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1.0);
const double EPS = 1e-8;
int q, n;
long long x, a, y, b, k;
long long p[MAXN];
bool check(int mid) {
  long long sum = 0;
  int pos = 0;
  for (int i = 1; i <= mid; ++i)
    if (i % a == 0 && i % b == 0) sum += p[++pos] / 100 * (x + y);
  if (x > y) {
    for (int i = 1; i <= mid; ++i)
      if (i % a == 0 && i % b != 0) sum += p[++pos] / 100 * x;
    for (int i = 1; i <= mid; ++i)
      if (i % a != 0 && i % b == 0) sum += p[++pos] / 100 * y;
  } else {
    for (int i = 1; i <= mid; ++i)
      if (i % b == 0 && i % a != 0) sum += p[++pos] / 100 * y;
    for (int i = 1; i <= mid; ++i)
      if (i % a == 0 && i % b != 0) sum += p[++pos] / 100 * x;
  }
  return sum >= k;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> q;
  while (q--) {
    cin >> n;
    for (int i = 1; i <= n; ++i) cin >> p[i];
    cin >> x >> a >> y >> b >> k;
    sort(p + 1, p + 1 + n);
    reverse(p + 1, p + 1 + n);
    int l = 1, r = n, ans = -1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (check(mid)) {
        r = mid - 1;
        ans = mid;
      } else
        l = mid + 1;
    }
    cout << ans << "\n";
  }
}
