#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 10;
int tab[maxn];
bool taken[maxn];
int w[maxn];
int main() {
  int te;
  scanf("%d", &te);
  while (te--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) taken[i] = false;
    taken[n + 1] = true;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &tab[i]);
      w[tab[i]] = i;
    }
    int i = 1;
    int poz = w[i];
    bool nice = true;
    while (i <= n && !taken[poz]) {
      taken[poz] = true;
      if (w[i + 1] != w[i] + 1 && taken[poz + 1] == false) nice = false;
      poz = w[++i];
    }
    (nice) ? printf("Yes\n") : printf("No\n");
  }
}
