func_code_string: #include <bits/stdc++.h>   using namespace std;   long long arr[300000];   long long temp[300000];   int main() {     int q;     cin >> q;     while (q--) {       int n;       cin >> n;       for (int i = 0; i < n; i++) {         cin >> arr[i];         temp[i] = arr[i];       }       int st = 0;       int endIdx1 = -1;       for (int i = 0; i < n; i++) {         if (arr[i] >= st) {           st++;           endIdx1 = i;         } else {           break;         }       }       if (endIdx1 == n - 1) {         cout <<  Yes  << endl;         continue;       }       st = 0;       int endIdx = n;       for (int i = n - 1; i >= 0; i--) {         if (arr[i] >= st) {           st++;           endIdx = i;         } else {           break;         }       }       if (endIdx == 0) {         cout <<  Yes  << endl;         continue;       }       if (endIdx1 >= endIdx) {         cout <<  Yes  << endl;       } else {         cout <<  No  << endl;       }     }     return 0;   }   