#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    vector<int> a(n);
    for (auto &i : a) cin >> i;
    bool ok = true;
    for (int i = 1; i < n; ++i) {
      if (a[i - 1] >= max(0, a[i] - k)) {
        int w = a[i - 1] - max(0, a[i] - k);
        m += w;
        continue;
      }
      if (m < max(0, a[i] - k) - a[i - 1]) {
        ok = false;
        break;
      }
      m -= max(0, a[i] - k) - a[i - 1];
    }
    if (ok)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
