#include <bits/stdc++.h>
using namespace std;
const long long N = 10e5 + 5;
const long long NN = 105;
const double pi = 3.14159;
const long long MAX = 2e5 + 123;
const long long MOD = 1e9 + 7;
const long long INF = 1000000000000000000;
const long long pw = 31;
void speed() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void hajime() {
  long long n, m, k, a[N];
  cin >> n >> m >> k;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i < n; i++) {
    if (a[i] >= a[i + 1]) {
      m += (a[i] - a[i + 1]);
      m += min(a[i + 1], k);
    } else {
      if (a[i + 1] - a[i] > k) {
        if (m >= a[i + 1] - a[i] - k)
          m -= a[i + 1] - a[i] - k;
        else {
          cout << "NO\n";
          return;
        }
      } else {
        if (a[i] - abs(a[i + 1] - k) < 0)
          m += a[i];
        else
          m += a[i] - max(a[i + 1] - k, 0LL);
      }
    }
  }
  cout << "YES\n";
}
int main() {
  long long miyagi = 1;
  speed();
  cin >> miyagi;
  while (miyagi--) hajime();
}
