#include <bits/stdc++.h>
const int N = 100100;
const long long mod = 1e9 + 7;
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, k;
    cin >> n >> m >> k;
    vector<long long> v(n);
    for (int i = 0; i < n; i++) cin >> v[i];
    long long i = 0;
    int flag = 1;
    while (i < n - 1) {
      long long p = abs(v[i] - v[i + 1]);
      if (p <= k) {
        m += v[i] >= v[i + 1] ? v[i] - v[i + 1] + min(k, v[i + 1])
                              : min(v[i], k - p);
        i++;
      } else {
        if (v[i] >= v[i + 1]) {
          m += v[i] - v[i + 1] + min(k, v[i + 1]);
          i++;
        } else {
          if (m >= (p - k)) {
            m -= p - k;
            i++;
          } else {
            cout << "NO"
                 << "\n";
            flag = 0;
            break;
          }
        }
      }
    }
    if (flag)
      cout << "YES"
           << "\n";
  }
  return 0;
}
