#include <bits/stdc++.h>
using namespace std;
long long ans, tot;
map<long long, long long> mp;
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k, i;
    cin >> n >> m >> k;
    long long a[n];
    for (i = 0; i < n; i++) cin >> a[i];
    int flag = 0;
    for (i = 0; i < n - 1; i++) {
      long long x = a[i] - a[i + 1];
      if (x > 0) {
        m += x;
        m += min(k, a[i + 1]);
        continue;
      }
      x = abs(x);
      if (x >= k) {
        m -= (x - k);
        if (m < 0) {
          flag = 1;
          break;
        }
        continue;
      } else {
        m += min(a[i], k - x);
      }
    }
    if (flag == 1)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
