#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, m, k;
    cin >> n >> m >> k;
    long long int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    long long int fail = 0, diff = 0;
    for (int i = 0; i < n - 1; i++) {
      diff = arr[i] - arr[i + 1];
      if (diff < 0) diff = 0;
      m += diff;
      arr[i] = arr[i] - diff;
      diff = arr[i + 1] - arr[i];
      if (diff < k) {
        diff = arr[i] - arr[i + 1] + k;
        if (diff < 0) diff = 0;
        int o = arr[i];
        arr[i] = arr[i] - diff;
        if (arr[i] < 0) {
          diff = o;
          arr[i] = 0;
        }
        m += diff;
      }
      diff = arr[i + 1] - arr[i];
      int l = diff - k;
      if (l < 0) l = 0;
      m = m - l;
      if (m < 0) {
        fail = 1;
        break;
      }
    }
    if (fail == 1) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
    }
  }
}
