#include <bits/stdc++.h>
using namespace std;
#define ll long long int
bool cmp(pair<double, ll> a, pair<double, ll> b)
{
  if (a.first > b.first)
    return true;
  else if (a.first == b.first)
  {
    if (a.second < b.second)
      return true;
  }
  return false;
}
bool sortfirst(pair<ll, char> a, pair<ll, char> b)
{
  return a.first > b.first;
}
ll gcd(ll a, ll b)
{
  if (b == 0)
    return a;
  return gcd(b, a % b);
}
ll lcm(ll a, ll b)
{
  return (a / gcd(a, b)) * b;
}
bool isPowerOfTwo(int n)
{
  if (n == 0)
    return false;

  return (ceil(log2(n)) == floor(log2(n)));
}
//int a[100010];
void solve()
{

  int t;
  cin >> t;
  while (t--)
  {
    ll n, x = 0;
    cin >> n;
    vector<ll> v(n);
    for (ll i = 0; i < n; i++)
    {
      cin >> v[i];
    }
    bool flag = true;
    for (ll i = 0; i < n; i++)
    {
      if (v[i] >= i)
      {
        x += (v[i] - i);
        v[i] = i;
      }
      else
      {
        if ((v[i] + x) >= i)
        {
          x -= (i - v[i]);
          v[i] = i;
        }
        else
        {
          flag = false;
        }
      }
    }

    if (flag)
    {
      v[n - 1] += x;
      bool flag1 = true;
      for (ll i = 1; i < n; i++)
      {
        if (v[i] < v[i - 1])
        {
          flag1 = false;
          break;
        }
      }
      if (flag1)
      {
        cout << "YES" << endl;
      }
      else
      {
        cout << "NO" << endl;
      }
    }
    else
    {
      cout << "NO" << endl;
    }
  }
}

int main()
{
  solve();
  return 0;
}
