#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)2e5 + 10;
int n, x, y, a, b, weight[MAXN];
pair<int, int> p[MAXN];
long long k;
bool check(int t) {
  static int w[MAXN];
  for (int i = 1; i <= n; ++i) {
    w[i] = weight[i];
  }
  sort(w + 1, w + 1 + t, greater<int>());
  long long sum = 0;
  for (int i = 1; i <= t; ++i) {
    sum += (long long)p[i].first * w[i];
  }
  return sum >= k * 100;
}
int main() {
  int test_count;
  scanf("%d", &test_count);
  for (int test_id = 0; test_id < test_count; ++test_id) {
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) {
      scanf("%d", &p[i].first);
      p[i].second = i;
    }
    scanf("%d%d", &x, &a);
    scanf("%d%d", &y, &b);
    scanf("%I64d", &k);
    sort(p + 1, p + 1 + n, greater<pair<int, int> >());
    for (int i = 1; i <= n; ++i) {
      weight[i] = 0;
    }
    for (int i = a; i <= n; i += a) {
      weight[i] += x;
    }
    for (int i = b; i <= n; i += b) {
      weight[i] += y;
    }
    int l = 1, r = n, f = -1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (check(mid)) {
        f = mid;
        r = mid - 1;
      } else {
        l = mid + 1;
      }
    }
    printf("%d\n", f);
  }
  return 0;
}
