#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    int s;
    scanf("%d", &s);
    int flag = 1;
    for (int i = 2; i <= n; i++) {
      int h;
      scanf("%d", &h);
      if (s >= h - k) {
        m += s - max(0, (h - k));
        s = h;
      } else {
        m -= h - k - s;
        s = h;
      }
      if (m < 0) flag = 0;
    }
    if (flag)
      puts("YES");
    else
      puts("NO");
  }
}
