#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
const int N = 200010;
int T;
int n, a[N], b[N], x, y, tx, ty, tb[N];
long long m;
template <typename T>
void gi(T &x) {
  x = 0;
  register char c = getchar(), pre = 0;
  for (; c < '0' || c > '9'; pre = c, c = getchar())
    ;
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10ll + (c ^ 48);
  if (pre == '-') x = -x;
}
long long calc(int len) {
  for (int i = (1); i <= (n); i++) {
    b[i] = a[i], tb[i] = 0;
    if (i % tx == 0) tb[i] += x;
    if (i % ty == 0) tb[i] += y;
  }
  sort(b + 1, b + n + 1, greater<int>());
  sort(tb + 1, tb + len + 1, greater<int>());
  long long w = 0;
  for (int i = (1); i <= (len); i++) w += 1ll * b[i] * tb[i];
  return w;
}
void solve() {
  gi(n);
  for (int i = (1); i <= (n); i++) gi(a[i]), a[i] /= 100;
  gi(x), gi(tx), gi(y), gi(ty), gi(m);
  if (calc(n) < m) {
    puts("-1");
    return;
  }
  int l = 1, r = n, mid;
  for (; l < r;) {
    mid = (l + r) >> 1;
    if (calc(mid) >= m)
      r = mid;
    else
      l = mid + 1;
  }
  printf("%d\n", r);
}
int main() {
  gi(T);
  for (; T; --T) solve();
  return 0;
}
