#include <bits/stdc++.h>
using namespace std;
int root(int dsu[], int x) {
  while (dsu[x] != x) {
    dsu[x] = dsu[dsu[x]];
    x = dsu[x];
  }
  return x;
}
void init(int dsu[], int n) {
  for (int i = 0; i <= n; i++) {
    dsu[i] = i;
  }
}
void un(int dsu[], int x, int y) {
  int a = root(dsu, x);
  int b = root(dsu, y);
  dsu[a] = dsu[b];
}
void printprecise(long double l, int precision) {
  std::cout << std::fixed;
  std::cout << std::setprecision(precision);
  std::cout << l << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> q;
  while (q--) {
    int n, m, k;
    cin >> n >> m >> k;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    bool flag = true;
    for (int i = 0; i < n - 1 && flag; i++) {
      if (arr[i] >= arr[i + 1]) {
        int x = arr[i] - arr[i + 1] + k;
        m += min(x, arr[i]);
      } else if (arr[i] < arr[i + 1]) {
        int x = abs(arr[i] - arr[i + 1]);
        if (x > k) {
          m -= x - k;
        } else {
          m += min(arr[i], k - x);
        }
        if (m < 0) {
          flag = false;
        }
      }
    }
    if (flag) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
