#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  ;
  int t = 1;
  cin >> t;
  while (t--) {
    long long n, i = 0, j, x, k, y, z, w, a, b, c, d, t1, t2, t3, t4;
    cin >> n;
    vector<long long> v(n, 0);
    for (i = 0; i < n; i++) {
      cin >> v[i];
    }
    x = n;
    k = 0;
    for (i = 0; i < n;) {
      while (v[i] != x) i++;
      y = x;
      for (j = i; j >= k; j--) {
        if (v[j] == (x - (i - j)))
          y--;
        else {
          cout << "No\n";
          goto label;
        }
      }
      x = y;
      k = i + 1;
      i++;
    }
    cout << "Yes\n";
  label:;
  }
  return 0;
}
