#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
long long Q, n, p[N], X, Y, A, B, K;
long long sum[N];
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
bool check(long long p) {
  long long ab = p / (1ll * A / gcd(A, B) * B), a = p / A - ab, b = p / B - ab;
  return sum[ab] / 100 * (X + Y) + (sum[ab + a] - sum[ab]) / 100 * X +
             (sum[ab + a + b] - sum[ab + a]) / 100 * Y >=
         K;
}
int main() {
  scanf("%lld", &Q);
  while (Q--) {
    scanf("%lld", &n);
    for (int i = 1; i <= n; i++) scanf("%lld", &p[i]);
    sort(p + 1, p + n + 1);
    reverse(p + 1, p + n + 1);
    for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + p[i];
    scanf("%lld", &X);
    scanf("%lld", &A);
    scanf("%lld", &Y);
    scanf("%lld", &B);
    if (X < Y) {
      swap(X, Y);
      swap(A, B);
    }
    scanf("%lld", &K);
    long long L = 1, R = n, Ans = N;
    while (L <= R) {
      int mid = (L + R) / 2;
      if (check(mid))
        Ans = mid, R = mid - 1;
      else
        L = mid + 1;
    }
    if (Ans == N)
      printf("-1\n");
    else
      printf("%lld\n", Ans);
  }
  return 0;
}
