#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n;
bool vis[N];
pair<int, int> p[N];
int main(void) {
  int t;
  cin >> t;
  while (t--) {
    scanf("%d", &n);
    memset(vis, 0, sizeof(bool) * (n + 1));
    memset(p, 0, sizeof(pair<int, int>) * (n + 1));
    for (int i = 1; i <= n; ++i) {
      scanf("%d", &p[i].first);
      p[i].second = i;
    }
    sort(p + 1, p + 1 + n);
    bool f = 1;
    int last = p[1].second;
    vis[last] = 1;
    for (int i = 2; i <= n; ++i) {
      if (last + 1 <= n)
        if (!vis[last + 1] && p[i].second != last + 1) {
          f = 0;
          break;
        }
      last = p[i].second;
      vis[last] = 1;
    }
    if (f)
      puts("Yes");
    else
      puts("No");
  }
  return 0;
}
