#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int maxN = 1 << 19, mod = 1000000007;
int T[maxN], I[maxN];
bool vis[maxN];
void solve() {
  int n;
  scanf("%d", &n);
  for (int i = (1); i < (n + 1); i++)
    scanf("%d", T + i), I[T[i]] = i, vis[i] = false;
  vis[n + 1] = true;
  for (int v = (1); v < (n + 1); v++) {
    for (int i = I[v]; !vis[i]; i++) {
      if (!vis[i + 1] and T[i + 1] != T[i] + 1) {
        printf("No\n");
        return;
      }
      vis[i] = true;
      v = T[i];
    }
  }
  printf("Yes\n");
}
int main() {
  int t = 1;
  scanf("%d", &t);
  while (t--) solve();
  return 0;
}
