#include <bits/stdc++.h>
using namespace std;
int arr[100005];
bool cont(int &a, int fin) {
  while (arr[a] < fin - 1) {
    if (arr[a + 1] == arr[a] + 1)
      ++a;
    else {
      return false;
    }
  }
  return true;
}
bool is_pos(int n) {
  int lim = n, ant;
  for (int i = 0; i < n; ++i) {
    ant = i;
    if (cont(i, lim)) {
      lim = arr[ant];
    } else {
      return false;
    }
  }
  return true;
}
int main() {
  int t, n, a;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; ++i) {
      cin >> a;
      arr[a - 1] = i;
    }
    if (is_pos(n))
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
