#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
int a[N];
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int n, m, k;
    scanf("%d%d%d", &n, &m, &k);
    int flag = 1;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 1; i < n; i++) {
      if (a[i] < a[i + 1]) {
        if (a[i] + k >= a[i + 1]) {
          m += a[i] - max(0, a[i + 1] - k);
        } else {
          m -= a[i + 1] - k - a[i];
          if (m < 0) flag = 0;
        }
      } else {
        m += a[i] - max(0, a[i + 1] - k);
      }
    }
    string ans;
    if (flag)
      ans = "YES";
    else
      ans = "NO";
    cout << ans << endl;
  }
  return 0;
}
