#include <bits/stdc++.h>
using namespace std;
int main() {
  int test;
  cin >> test;
  while (test--) {
    long long int n, m, k;
    cin >> n >> m >> k;
    vector<int> tower(n);
    for (int i = 0; i < n; i++) cin >> tower[i];
    bool possible = true;
    for (int i = 0; i < n - 1; i++) {
      if (tower[i] >= tower[i + 1]) {
        int diff = abs(tower[i] - tower[i + 1]);
        int temp = 0;
        if (tower[i + 1] >= k) {
          temp = k;
        } else {
          temp = tower[i + 1];
        }
        m += diff + temp;
      } else {
        int diff = abs(tower[i] - tower[i + 1]);
        if (diff <= k) {
          int to_add = k - (tower[i + 1] - tower[i]);
          if (tower[i] >= to_add) {
            m += to_add;
          } else
            m += tower[i];
          continue;
        } else {
          int to_add = tower[i + 1] - k - tower[i];
          if (to_add <= m) {
            m -= to_add;
          } else {
            possible = false;
            break;
          }
        }
      }
    }
    if (possible)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
