func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1e5;   int a[N + 2], p[N + 2];   void solve() {     int n;     cin >> n;     for (int i = 1; i <= n; i++) {       int x;       cin >> x;       a[x] = i, p[i] = 0;     }     p[n + 1] = 1;     int nx = -1;     for (int i = 1; i <= n; i++) {       if (nx == -1) {         p[a[i]] = 1;         if (p[a[i] + 1] == 0) nx = a[i] + 1;       } else {         if (a[i] != nx) {           cout <<  NO n ;           return;         }         nx++;         if (p[nx]) nx = -1;       }     }     cout <<  YES n ;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int t;     cin >> t;     while (t--) {       solve();     }     return 0;   }   