#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265358979323846;
void debn(vector<int> a) {
  for (auto v : a) cout << v << ' ';
  cout << endl;
}
void debnn(vector<vector<int>> a) {
  for (auto v : a) {
    for (auto w : v) cout << w << ' ';
    cout << endl;
  }
}
unsigned long long powmod(unsigned long long x, unsigned long long y,
                          unsigned long long mod) {
  unsigned long long res = 1;
  while (y) {
    if (y & 1) res = res * x % mod;
    y >>= 1;
    x = x * x % mod;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    vector<int> a;
    a.resize(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    bool ok = true;
    for (int i = 0; i < n - 1; i++) {
      if (a[i] >= a[i + 1]) {
        m += min(a[i] - a[i + 1] + k, a[i]);
        continue;
      } else {
        if (a[i] + k >= a[i + 1]) {
          m += min(a[i] + k - a[i + 1], a[i]);
        } else {
          int x = a[i + 1] - a[i] - k;
          if (x > m) {
            ok = false;
            break;
          } else
            m -= x;
        }
      }
    }
    if (ok)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
