#include <bits/stdc++.h>
using namespace std;
int a[300005];
int n;
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    ;
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = n; i >= 1; i--) a[i] -= a[i - 1];
    int sum = 0;
    for (int i = 2; i <= n; i++)
      if (a[i] < 0) sum -= a[i];
    if (a[1] >= sum)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
