#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const long long NINF = -INF;
const long long MAXN = 1e+6 + 8;
int dx8[] = {0, 1, 1, 1, 0, -1, -1, -1}, dy8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dx4[] = {0, 1, 0, -1}, dy4[] = {1, 0, -1, 0};
void MAIN() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> h(n);
  for (long long i = (0); i <= (n - 1); i++) cin >> h[i];
  int res = 1;
  for (long long i = (0); i <= (n - 2); i++) {
    if (abs(h[i] - h[i + 1]) <= k) {
      if (h[i] > h[i + 1]) {
        m += (h[i] - h[i + 1]);
        h[i] = h[i + 1];
      }
      if (h[i] > h[i + 1] - k) m += (min(k - (h[i + 1] - h[i]), h[i]));
      continue;
    }
    if (h[i] > h[i + 1])
      m += (h[i] - h[i + 1] + min(h[i + 1], k));
    else if (h[i] < h[i + 1] and (m >= h[i + 1] - k - h[i]))
      m -= (h[i + 1] - k - h[i]);
    else {
      res = 0;
      break;
    }
  }
  if (res)
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t = 1;
  cin >> t;
  while (t--) {
    MAIN();
  }
}
