#include <bits/stdc++.h>
using namespace std;
int main() {
  int total, n, arr[200001], x, a, y, b, temp, *gbs;
  long long v, k, *sum;
  cin >> total;
  while (total--) {
    cin >> n;
    gbs = new int[n + 1];
    sum = new long long[n + 1];
    for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
    cin >> x >> a >> y >> b >> k;
    if (x < y) swap(x, y), swap(a, b);
    sort(arr, arr + n);
    int exp, ac, bc, i;
    gbs[0] = 0;
    for (i = 1; i <= n; i++) {
      if (i % a == 0 && i % b == 0)
        gbs[i] = gbs[i - 1] + 1;
      else
        gbs[i] = gbs[i - 1];
    }
    sum[n] = 0;
    for (i = n - 1; i >= 0; i--) sum[i] = sum[i + 1] + arr[i] / 100;
    for (i = 1; i <= n; i++) {
      if (i % a && i % b) continue;
      v = 0;
      exp = n - 1;
      ac = i / a - gbs[i];
      bc = i / b - gbs[i];
      v += (sum[exp - gbs[i] + 1] - sum[exp + 1]) * (x + y);
      exp -= gbs[i];
      v += (sum[exp - ac + 1] - sum[exp + 1]) * x;
      exp -= ac;
      v += (sum[exp - bc + 1] - sum[exp + 1]) * y;
      exp -= bc;
      if (v >= k) break;
    }
    if (v >= k)
      cout << i << endl;
    else
      cout << -1 << endl;
  }
  return 0;
}
