#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k, i, j;
    cin >> n >> m >> k;
    vector<long long> a(n + 1);
    for (i = 0; i < n; i++) cin >> a[i];
    if (n == 1)
      cout << "YES" << endl;
    else {
      long long curr = m, curdiff;
      bool f = 0;
      for (i = 0; i < n - 1; i++) {
        if (a[i] <= a[i + 1]) {
          curdiff = a[i + 1] - a[i];
          if (curdiff <= k) {
            curr += min(a[i], (a[i] - (a[i + 1] - k)));
            continue;
          } else {
            if (curdiff - k <= curr) {
              curr = curr - (curdiff - k);
              continue;
            } else {
              f = 1;
              break;
            }
          }
        } else {
          curdiff = a[i] - a[i + 1];
          curr += curdiff + min(a[i + 1], k);
          continue;
        }
      }
      if (f == 1)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    }
  }
}
