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