#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize(4)
using namespace std;
const int N = 2e5 + 10;
int p[N], x, y, a, b, n, q, tmp[N];
long long k;
long long ck(int n) {
  long long tot = 0;
  for (int i = 1; i <= n; ++i) {
    tmp[i] = 0;
    if (i % a == 0) tmp[i] += x;
    if (i % b == 0) tmp[i] += y;
  }
  sort(tmp + 1, tmp + 1 + n, greater<int>());
  for (int i = 1; i <= n; ++i) tot += tmp[i] * 1LL * p[i];
  return tot;
}
int main() {
  scanf("%d", &q);
  while (q--) {
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) scanf("%d", &p[i]), p[i] /= 100;
    scanf("%d %d", &x, &a);
    scanf("%d %d", &y, &b);
    scanf("%lld", &k);
    sort(p + 1, p + 1 + n, greater<int>());
    if (ck(n) < k)
      printf("-1\n");
    else {
      int l = 1, r = n, m = l + r >> 1;
      while (l < r) {
        if (ck(m) >= k)
          r = m;
        else
          l = m + 1;
        m = l + r >> 1;
      }
      printf("%d\n", m);
    }
  }
  return 0;
}
