#include <bits/stdc++.h>
using namespace std;
int compare(const void* pa, const void* pb) {
  long long int p1 = *(const long long int*)pa;
  long long int p2 = *(const long long int*)pb;
  if (p1 < p2)
    return 1;
  else if (p1 > p2)
    return -1;
  else if (p1 == p2)
    return 0;
}
long long int arr[200500], s[200500][2], ans[200500];
int main() {
  int j, t, n;
  cin >> t;
  while (t--) {
    int p = 0, x, y, a1, b1, a, b, low, high, mx, l = 0, m = 0, h = 0, w = -1;
    long long sum = 0, k;
    cin >> n;
    for (j = 0; j < n; j++) cin >> arr[j];
    cin >> x >> a;
    cin >> y >> b;
    cin >> k;
    a1 = a;
    b1 = b;
    qsort(arr, n, sizeof(arr[0]), compare);
    while (1) {
      if (a < b) {
        s[p][0] = a;
        s[p][1] = x;
        p++;
        a += a1;
      } else if (b < a) {
        s[p][0] = b;
        s[p][1] = y;
        p++;
        b += b1;
      } else {
        s[p][0] = a;
        s[p][1] = x + y;
        p++;
        a += a1;
        b += b1;
      }
      if (a > n && b > n) break;
    }
    low = min(x, y);
    high = max(x, y);
    mx = x + y;
    for (j = 0; j < p; j++) {
      if (s[j][1] == low) {
        sum += (arr[l] / 100) * (s[j][1] - ans[l]);
        ans[l] = low;
        l++;
      } else if (s[j][1] == high) {
        sum += (arr[h] / 100) * (s[j][1] - ans[h]);
        ans[h] = high;
        if (h != l) {
          sum += (arr[l] / 100) * (low - ans[l]);
          ans[l] = low;
        }
        h++;
        l++;
      } else if (s[j][1] == mx) {
        sum += (arr[m] / 100) * (s[j][1] - ans[m]);
        ans[m] = mx;
        if (m != h) {
          sum += (arr[h] / 100) * (high - ans[h]);
          ans[h] = high;
        }
        if (h != l) {
          sum += (arr[l] / 100) * (low - ans[l]);
          ans[l] = low;
        }
        m++;
        h++;
        l++;
      }
      if (sum >= k) {
        w = s[j][0];
        break;
      }
    }
    cout << w << '\n';
    for (j = 0; j < n; j++) {
      s[j][0] = 0;
      s[j][1] = 0;
      arr[j] = 0;
      ans[j] = 0;
    }
  }
}
