#include <bits/stdc++.h>
using namespace std;
long long v[500000];
long long k, c;
long long sum;
long long aa, bb, x, y, a, b, r, l, mid, q, n, vv, xx, yy, ans;
long long gcd(long long u, long long v) {
  for (int i = u; i >= 1; i--)
    if ((u % i == 0) && (v % i == 0)) return i;
}
bool check(long long t) {
  long long e = t / c;
  long long f = t / a;
  long long g = t / b;
  for (int i = 1; i <= t; i++) {
    if (e > 0) {
      sum += (x + y) * v[n - i + 1];
      e--;
      f--;
      g--;
    } else if (f > 0) {
      sum += x * v[n - i + 1];
      f--;
    } else if (g > 0) {
      sum += y * v[n - i + 1];
      g--;
    }
  }
  if (sum >= k)
    return true;
  else
    return false;
}
int main() {
  cin >> q;
  for (int i = 1; i <= q; i++) {
    cin >> n;
    for (int j = 1; j <= n; j++) {
      cin >> vv;
      v[j] = vv / 100;
    }
    sort(v + 1, v + n + 1);
    cin >> xx >> aa;
    cin >> yy >> bb;
    if (xx > yy) {
      a = aa;
      b = bb;
      x = xx;
      y = yy;
    } else {
      x = yy;
      a = bb;
      b = aa;
      y = xx;
    }
    cin >> k;
    c = (a * b) / gcd(b, a);
    r = n;
    l = 1;
    ans = -1;
    while (l <= r) {
      mid = (r + l) / 2;
      sum = 0;
      if (check(mid)) {
        ans = mid;
        r = mid - 1;
      } else
        l = mid + 1;
    }
    cout << ans << endl;
  }
}
