#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int tc;
  cin >> tc;
  while (tc--) {
    long long n, m, k;
    cin >> n >> m >> k;
    vector<long long> h(n + 1);
    for (int i = 1; i <= n; i++) cin >> h[i];
    int cur = 1;
    while (cur < n) {
      if (h[cur] <= h[cur + 1]) {
        long long dif = h[cur + 1] - h[cur];
        if (dif > k) {
          long long need = 0;
          need = dif - k;
          m -= need;
        } else {
          long long go = max(0LL, h[cur + 1] - k);
          m += abs(h[cur] - go);
        }
        if (m < 0) break;
        cur++;
      } else {
        long long go = max(0LL, h[cur + 1] - k);
        m += abs(h[cur] - go);
        cur++;
      }
    }
    if (cur == n)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return (0);
}
