#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    bool flag = false;
    int n, m, k, curr;
    cin >> n >> m >> k >> curr;
    for (int i = 1; i < n; i++) {
      int h;
      cin >> h;
      int rh = h - k;
      if (rh < 0) rh = 0;
      if (curr >= rh) {
        m += curr - rh;
      } else {
        m -= rh - curr;
      }
      if (m < 0) {
        flag = true;
      }
      curr = h;
    }
    if (flag) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
}
