#include <bits/stdc++.h>
using namespace std;
mt19937_64 rang(
    chrono::high_resolution_clock::now().time_since_epoch().count());
int rng(int lim) {
  uniform_int_distribution<int> uid(0, lim - 1);
  return uid(rang);
}
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n), pos(n);
  for (int& i : v) cin >> i;
  for (int i = 0; i < n; i++) pos[--v[i]] = i;
  vector<bool> vis(n, 0);
  for (int i = 0; i < n; i++) {
    if (vis[i]) continue;
    int idx = pos[i];
    while (idx < n) {
      vis[idx] = 1;
      if (idx + 1 == n) break;
      if (vis[idx + 1]) break;
      if (v[idx + 1] == v[idx] + 1) {
        idx++;
        continue;
      }
      cout << "No\n";
      return;
    }
  }
  cout << "Yes\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
