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