#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  while (cin >> t) {
    while (t--) {
      int n, m, k;
      cin >> n >> m >> k;
      int *data = new int[n];
      for (int i = 0; i < n; i++) {
        cin >> data[i];
      }
      if (n == 1) {
        cout << "YES" << endl;
      } else {
        int flag = 1;
        for (int i = 1; i < n; i++) {
          if (data[i - 1] - data[i] > 0) {
            m += data[i - 1] - data[i];
            data[i - 1] = data[i];
          }
          if (data[i] >= k) {
            m -= data[i] - data[i - 1] - k;
          } else {
            m += data[i - 1];
          }
          if (m < 0) {
            flag = 0;
            break;
          }
        }
        if (flag) {
          cout << "YES" << endl;
        } else {
          cout << "NO" << endl;
        }
      }
    }
  }
  return 0;
}
