#include <bits/stdc++.h>
using namespace std;
long long int n;
long long int x, a, y, b;
long long int k;
long long int calc(long long int ind, long long int ar[]) {
  long long int cntX = 0, cntY = 0, cntXY = 0;
  for (int i = 1; i <= ind; ++i) {
    if (i % a == 0 && i % b == 0) {
      ++cntXY;
    } else if (i % a == 0) {
      ++cntX;
    } else if (i % b == 0) {
      ++cntY;
    }
  }
  long long int ans = 0;
  for (long long int i = 0; i < ind; i++) {
    if (i < cntXY)
      ans += (x + y) * ar[i] / 100;
    else if (i < cntXY + cntX)
      ans += x * ar[i] / 100;
    else if (i < cntXY + cntX + cntY)
      ans += y * ar[i] / 100;
  }
  return ans;
}
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    cin >> n;
    long long int ar[n];
    for (long long int i = 0; i < n; i++) cin >> ar[i];
    cin >> x >> a >> y >> b;
    cin >> k;
    sort(ar, ar + n);
    reverse(ar, ar + n);
    if (x < y) {
      swap(a, b);
      swap(x, y);
    }
    long long int l = 0, r = n + 1, ans = -1;
    if (n == 1) {
      if (calc(1, ar) >= k)
        cout << "1\n";
      else
        cout << "-1\n";
      continue;
    }
    while (l + 1 < r) {
      long long int m = (l + r) / 2;
      if (calc(m, ar) >= k) {
        ans = m;
        r = m;
      } else {
        l = m;
      }
    }
    if (ans == -1)
      cout << "-1\n";
    else
      cout << ans << "\n";
  }
}
