#include <bits/stdc++.h>
using namespace std;
set<char> st;
bool is_connected(set<int> a[], int src, int des, int v, int pred[],
                  int dist[]) {
  list<int> q;
  bool vis[v];
  for (int i = 0; i < v; i++) {
    vis[i] = false;
    dist[i] = INT_MAX;
    pred[i] = -1;
  }
  vis[src] = true;
  dist[src] = 0;
  q.push_back(src);
  while (!q.empty()) {
    int u = q.front();
    q.pop_front();
    set<int>::iterator it;
    for (it = a[u].begin(); it != a[u].end(); it++) {
      if (vis[*it] == false) {
        vis[*it] = true;
        dist[*it] = dist[u] + 1;
        pred[*it] = u;
        q.push_back(*it);
        if (*it == des) return true;
      }
    }
  }
  return false;
}
int shortestDist(set<int> a[], int src, int des, int v) {
  int pred[v], dist[v];
  if (is_connected(a, src, des, v, pred, dist) == false) {
    return -1;
  }
  vector<int> path;
  int crawl = des;
  path.push_back(crawl);
  while (pred[crawl] != -1) {
    path.push_back(pred[crawl]);
    crawl = pred[crawl];
  }
  return dist[des];
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  ;
  long long t, n, k, m, i;
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    vector<long long> h(n);
    for (i = 0; i < n; i++) cin >> h[i];
    for (i = 0; i < n - 1; i++) {
      if (h[i] > h[i + 1]) {
        m += h[i] - h[i + 1];
        h[i] = h[i + 1];
        if (k > h[i])
          m += h[i];
        else
          m += k;
      } else {
        if (h[i + 1] - h[i] < k) {
          if (k - h[i + 1] + h[i] > h[i])
            m += h[i];
          else
            m += k - h[i + 1] + h[i];
        } else {
          m -= h[i + 1] - h[i] - k;
        }
      }
      if (m < 0) break;
    }
    if (m < 0)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
