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