#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<long long> v(n);
    long long i, j, k;
    for (i = 0; i < n; i++) {
      cin >> v[i];
      v[i] = v[i] / 100;
    }
    sort(v.begin(), v.end(), greater<int>());
    long long x, y, a, b;
    cin >> x >> a;
    cin >> y >> b;
    long long kk;
    cin >> kk;
    long long start = 1;
    long long end = n;
    long long mid, ans = -1;
    while (start <= end) {
      mid = start + (end - start) / 2;
      long long aa = 0;
      long long bb = 0;
      long long cc = 0;
      for (i = 1; i <= mid; i++) {
        if (i % a == 0 && i % b == 0)
          cc++;
        else if (i % a == 0)
          aa++;
        else if (i % b == 0)
          bb++;
      }
      long long cost = 0;
      long long xy = x + y;
      i = 0;
      long long tt = 1;
      while (tt <= cc) {
        tt++;
        cost += ((xy * v[i]));
        i++;
      }
      if (y > x) {
        tt = 1;
        while (tt <= bb) {
          tt++;
          cost += ((y * v[i]));
          i++;
        }
        tt = 1;
        while (tt <= aa) {
          tt++;
          cost += ((x * v[i]));
          i++;
        }
      } else {
        tt = 1;
        while (tt <= aa) {
          tt++;
          cost += ((x * v[i]));
          i++;
        }
        tt = 1;
        while (tt <= bb) {
          tt++;
          cost += ((y * v[i]));
          i++;
        }
      }
      if (cost >= kk) {
        ans = mid;
        end = mid - 1;
      } else
        start = mid + 1;
    }
    cout << ans << endl;
  }
}
