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