#include <bits/stdc++.h>
using namespace std;
long long ast[200009];
long long a, b, x, y, n, k;
long long ks[200009];
bool chk(long long md) {
  for (long long i = (1); i <= (md); i++) {
    ks[i] = 0ll;
  }
  for (long long i = (1); i <= (md); i++) {
    if (i % a == 0) {
      ks[i] += x;
    }
    if (i % b == 0) {
      ks[i] += y;
    }
  }
  sort(ks + 1, ks + md + 1, greater<long long>());
  long long crt = 0, mj;
  for (long long i = (1); i <= (md); i++) {
    mj = ast[i] / 100ll;
    mj = mj * ks[i];
    crt += mj;
  }
  if (crt >= k) {
    return true;
  } else {
    return false;
  }
}
void solve() {
  cin >> n;
  for (long long i = (1); i <= (n); i++) {
    cin >> ast[i];
  }
  sort(ast + 1, ast + n + 1, greater<long long>());
  cin >> x >> a;
  cin >> y >> b;
  cin >> k;
  long long st = 1, en = n, mid, ans = -1;
  while (st <= en) {
    mid = (st + en) / 2ll;
    if (chk(mid)) {
      ans = mid;
      en = mid - 1ll;
    } else {
      st = mid + 1ll;
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
