#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], ind[N], n;
bool checked[N];
int main() {
  int _;
  cin >> _;
  while (_--) {
    cin >> n;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      ind[a[i]] = i;
      checked[i] = false;
    }
    int now = 1, wz = ind[1];
    checked[n + 1] = true;
    while (now <= n && a[wz] == now) {
      checked[wz] = true;
      wz++;
      now++;
      if (checked[wz] == true && now <= n) {
        wz = ind[now];
      }
    }
    if (now <= n) {
      cout << "No\n";
    } else {
      cout << "Yes\n";
    }
  }
}
