#include<bits/stdc++.h>
using namespace std;
#define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define pi pair<int, int>
#define F first
#define S second
#define PB push_back
#define EPB emplace_back
#define MP make_pair
#define deb(x) cerr << #x << ":" << x << endl;
#define deba(x) cerr << #x << endl; for (auto a : x) cerr << a << " "; cerr << endl;
const int MOD = 1000000007;


int main() {
    fastio();
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        ll a[n];
        for (int i = 0; i < n; i++) {
            cin >> a[i];
        }
        ll carry = a[0];
        a[0] = 0;
        bool ok = 1;
        for (int i = 1; i < n; i++) {
            ll diff = a[i - 1] + 1 - a[i];
            if (diff > 0) {
                if (carry < diff) {
                    ok = 0;
                    break;
                } else {
                    carry -= diff;
                    a[i] = a[i - 1] + 1;
                }
            } else {
                // diff <= 0
                carry -= diff;
                a[i] = a[i - 1] + 1;
            }
        }
        cout << (ok ? "YES" : "NO") << '\n';

    }
    return 0;
}
