#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
long long sum[maxn], s[maxn];
bool cmp(long long x, long long y) { return x > y; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> q;
  while (q--) {
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
      long long t;
      cin >> t;
      s[i] = t / 100;
    }
    long long x, y, a, b;
    cin >> x >> a;
    cin >> y >> b;
    long long k;
    if (x < y) swap(x, y), swap(a, b);
    cin >> k;
    sort(s + 1, s + 1 + n, cmp);
    int pos;
    long long res = 0ll;
    sum[0] = 0;
    int t1 = 0, t2 = 0, t3 = 0;
    for (pos = 1; pos <= n; pos++) {
      sum[pos] = sum[pos - 1] + s[pos];
      if (pos % a == 0) t1++;
      if (pos % b == 0) t2++;
      if (pos % a == 0 && pos % b == 0) t3++;
      res = sum[t3] * (x + y) + (sum[t1] - sum[t3]) * x +
            (sum[t1 + t2 - t3] - sum[t1]) * y;
      if (res >= k) break;
    }
    if (pos != n + 1)
      cout << pos << endl;
    else
      cout << "-1" << endl;
  }
  return 0;
}
