#include <bits/stdc++.h>
using namespace std;
const unsigned long long maxn = 1e5 + 10;
int n, k, T;
int a[maxn];
int sum[maxn];
int q[maxn], l, r;
bool check() {
  for (int i = 2; i <= n; i++) {
    if (sum[i] > sum[i - 1]) return false;
  }
  return true;
}
void cal() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  memset(sum, 0, sizeof(sum));
  l = 1;
  r = 1;
  q[1] = maxn;
  for (int i = 1; i <= n; i++) {
    while (q[i] >= a[i] - 1 && l <= r) l++;
    q[++r] = a[i];
    sum[a[i]] = r - l + 1;
  }
  if (check()) {
    cout << "Yes\n";
  } else
    cout << "No\n";
}
signed main() {
  cin >> T;
  while (T--) {
    cal();
  }
  return 0;
}
