#include <bits/stdc++.h>
using namespace std;
int a[100010], pos[100010], vis[100010];
int main() {
  int t, n;
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> t;
  for (int _ = 1; _ <= t; _++) {
    cin >> n;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      pos[a[i]] = i;
    }
    a[n + 1] = 0;
    pos[n + 1] = 0;
    int now = pos[1], cnt = 1, flag = 0;
    while (cnt <= n) {
      while (now <= n && a[now] == cnt && vis[now] != _) {
        vis[now] = _;
        cnt++;
        now++;
      }
      if (now == n + 1 || vis[now] == _)
        now = pos[cnt];
      else {
        flag = 1;
        break;
      }
    }
    if (flag)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
  }
  return 0;
}
