#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T x, T y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
template <class T>
T euclideanDistance(T x1, T x2, T y1, T y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
template <class T>
T digitSum(T n) {
  T sum = 0;
  while (n > 0) sum += n % 10, n /= 10;
  return sum;
}
const double INF = 1e+9;
const double INFLL = 1e+18;
const double EPS = 1e-9;
const double PI = acos(-1);
const int knightDir[8][2] = {{-2, -1}, {-2, 1}, {-1, 2},  {1, 2},
                             {2, -1},  {2, 1},  {-1, -2}, {1, -2}};
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const long long int MOD = 1000000000 + 7;
int arr[1000005];
char str[1000005 + 10];
int price[1000005] = {0, 1, 5, 8, 9, 10, 17, 17, 20, 24, 30};
int dp[1000005], n;
int main() {
  int test;
  scanf("%d", &test);
  while (test--) {
    int n;
    scanf("%d", &n);
    int arr[n + 1], pos[n + 1];
    for (int i = 1; i <= n; i++) {
      scanf("%d", &arr[i]);
      pos[arr[i]] = i;
    }
    map<int, bool> mp;
    bool dec = true;
    for (int i = 1; i <= n; i++) {
      if (!dec) break;
      if (mp[i]) continue;
      int place = pos[i];
      while (place < n + 1) {
        mp[place] = true;
        if (mp[place + 1]) break;
        if (place + 1 == n + 1) break;
        if (arr[place + 1] == arr[place] + 1) {
          place++;
          continue;
        }
        dec = false;
        break;
      }
    }
    if (dec) {
      printf("Yes\n");
    } else
      printf("No\n");
  }
}
