#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, m, k, height, prev_height, required, extracted;
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    cin >> prev_height;
    bool can_do = true;
    for (int i = 1; i < n; i++) {
      cin >> height;
      if (can_do && abs(height - prev_height) > k) {
        if (prev_height > height) {
          extracted = prev_height - height + min(height, k);
          m += extracted;
        } else {
          required = height - prev_height - k;
          if (required > m) {
            can_do = false;
          } else {
            m -= required;
          }
        }
      } else if (can_do) {
        if (prev_height >= height) {
          extracted = prev_height - height + min(height, k);
        } else {
          extracted = min(height, k) - (height - prev_height);
        }
        m += extracted;
      }
      prev_height = height;
    }
    if (can_do) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
