#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1.0);
const double esp = 0.00000001;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
long long Pow(long long a, long long n, long long mod) {
  long long res = 1ll;
  a %= mod;
  while (n) {
    if (n & 1) res = res * a % mod;
    n >>= 1;
    a = a * a % mod;
  }
  return res;
}
struct node {
  int h, id;
  node() { h = 0, id = 0; }
  node(int _h, int _id) { h = _h, id = _id; }
  bool operator<(const node& a) const {
    if (a.h == h) return a.id < id;
    return a.h < h;
  }
};
bool cmp(int a, int b) { return a > b; }
const int maxn = 200005;
const long long mod = 998244353;
int A[maxn];
int a[maxn];
map<int, int> mp;
int main() {
  int T;
  while (~scanf("%d", &T)) {
    for (int _t = (1); _t < (T + 1); ++_t) {
      mp.clear();
      int n;
      scanf("%d", &n);
      int pos = 1;
      for (int i = (1); i < (n + 1); ++i) {
        scanf("%d", &a[i]);
        mp[a[i]] = i;
      }
      bool answer = true;
      int cnt = 0;
      int t = 1, last = mp[1];
      while (cnt < n) {
        int idx = mp[t];
        if (idx > last) {
          answer = false;
          break;
        }
        while (idx <= n && a[idx] == t) ++t, ++idx, ++cnt;
        last = idx;
      }
      if (answer)
        printf("Yes\n");
      else
        printf("No\n");
    }
  }
  return 0;
}
