#include <bits/stdc++.h>
using namespace std;
long long fact[1000001], power[1000001];
long long powerr(long long x, long long y);
long long mpower(long long x, long long y, long long p);
long long gcdExtended(long long a, long long b);
bool isPrime(long long n);
vector<long long> v[1000000];
int vis[1000000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, j, k, l, h, p, q, r, x, i, y, z, a, b, c, d, n, m,
      M = 1000000007;
  char ch, ch2, ch3;
  string s1, s2, s3;
  set<pair<long long, long long> > S1, S;
  cin >> t;
  x = 0;
  while (t--) {
    cin >> n;
    long long A[n];
    for (i = 0; i < n; i++) cin >> A[i];
    long long cnt1 = 0;
    long long cnt2 = 0;
    int flag = 0;
    for (i = 1; i < n; i++) {
      if (A[i] - A[i - 1] == 1) {
        continue;
      }
      if (A[i] - A[i - 1] < 0) {
        continue;
      }
      flag = 1;
      break;
    }
    if (flag == 0) {
      cout << "Yes\n";
    } else
      cout << "No\n";
  }
}
long long gcdExtended(long long a, long long b) {
  if (b == 0) {
    return a;
  } else
    return gcdExtended(b, a % b);
}
long long mpower(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long powerr(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  long long p = sqrt(n);
  for (int i = 5; i <= p; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
