#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int q;
  cin >> q;
  while (q--) {
    long long int n, m, k;
    cin >> n >> m >> k;
    long long int a[n + 1], b, c, flag;
    flag = 0;
    a[0] = 0;
    for (int i = 1; i < n + 1; i++) cin >> a[i];
    for (int i = 1; i < n + 1; i++) {
      if (i == n) {
        flag = 1;
        break;
      }
      c = a[i + 1] - a[i];
      if (c < 0) {
        m += abs(c) + min(k, a[i + 1]);
      } else {
        b = c - k;
        if (b >= 0) {
          if (m < b) {
            cout << "NO" << endl;
            break;
          } else
            m = m - b;
        } else {
          m = m + min(a[i], abs(b));
        }
      }
    }
    if (flag == 1) cout << "YES" << endl;
  }
  return 0;
}
