#include <bits/stdc++.h>
using namespace std;
long long toint(const string &s) {
  stringstream ss;
  ss << s;
  long long x;
  ss >> x;
  return x;
}
string tostring(long long number) {
  stringstream ss;
  ss << number;
  return ss.str();
}
long mul(long a, long b, long c) {
  long long res = (long long)a * b;
  return (res >= c ? res % c : res);
}
template <typename T>
T mod(T a, T b) {
  return (a < b ? a : a % b);
}
template <typename T>
T mod_neg(T a, T b) {
  a = mod(a, b);
  if (a < 0) {
    a += b;
  }
  return a;
}
long long mulmod(long long a, long long b, long long m) {
  long long q = (long long)(((long double)a * (long double)b) / (long double)m);
  long long r = a * b - q * m;
  if (r > m) r %= m;
  if (r < 0) r += m;
  return r;
}
template <typename T>
T expo(T e, T n) {
  T x = 1, p = e;
  while (n) {
    if (n & 1) x = x * p;
    p = p * p;
    n >>= 1;
  }
  return x;
}
template <typename T>
T power(T e, T n, T m) {
  T x = 1, p = e;
  while (n) {
    if (n & 1) x = mod(x * p, m);
    p = mod(p * p, m);
    n >>= 1;
  }
  return x;
}
template <typename T>
T powerL(T e, T n, T m) {
  T x = 1, p = e;
  while (n) {
    if (n & 1) x = mulmod(x, p, m);
    p = mulmod(p, p, m);
    n >>= 1;
  }
  return x;
}
template <typename T>
T InverseEuler(T a, T m) {
  return (a == 1 ? 1 : power(a, m - 2, m));
}
template <typename T>
T gcd(T a, T b) {
  return (b ? __gcd(a, b) : a);
}
template <typename T>
T lcm(T a, T b) {
  return (a * (b / gcd(a, b)));
}
template <typename T>
T extended_euclid(T a, T b, T &x, T &y) {
  T xx = 0, yy = 1;
  y = 0;
  x = 1;
  while (b) {
    T q = a / b, t = b;
    b = a % b;
    a = t;
    t = xx;
    xx = x - q * xx;
    x = t;
    t = yy;
    yy = y - q * yy;
    y = t;
  }
  return a;
}
template <typename T>
T mod_inverse(T a, T n) {
  T x, y;
  T d = extended_euclid(a, n, x, y);
  return (d > 1 ? -1 : mod_neg(x, n));
}
template <class T>
T fast_gcd(T u, T v) {
  long shl = 0;
  while (u && v && u != v) {
    T eu = u & 1;
    u >>= eu ^ 1;
    T ev = v & 1;
    v >>= ev ^ 1;
    shl += (~(eu | ev) & 1);
    T d = u & v & 1 ? (u + v) >> 1 : 0;
    T dif = (u - v) >> (sizeof(T) * 8 - 1);
    u -= d & ~dif;
    v -= d & dif;
  }
  return std::max(u, v) << shl;
}
template <class T>
bool isPrime(T x) {
  if (x <= 4 || x % 2 == 0 || x % 3 == 0) return x == 2 || x == 3;
  for (T i = 5; i * i <= x; i += 6)
    if (x % i == 0 || x % (i + 2) == 0) return 0;
  return 1;
}
long long compute_hash(string const &s) {
  const int p = 31;
  const int m = 1e9 + 9;
  long long hash_value = 0;
  long long p_pow = 1;
  for (char c : s) {
    hash_value = (hash_value + (c - 'a' + 1) * p_pow) % m;
    p_pow = (p_pow * p) % m;
  }
  return hash_value;
}
vector<vector<int>> group_identical_strings(vector<string> const &s) {
  int n = s.size();
  vector<pair<long long, int>> hashes(n);
  for (int i = 0; i < n; i++) hashes[i] = {compute_hash(s[i]), i};
  sort(hashes.begin(), hashes.end());
  vector<vector<int>> groups;
  for (int i = 0; i < n; i++) {
    if (i == 0 || hashes[i].first != hashes[i - 1].first) groups.emplace_back();
    groups.back().push_back(hashes[i].second);
  }
  return groups;
}
vector<int> zFunc(string s) {
  int n = s.size();
  vector<int> z(n);
  for (int i = 1, l = 0, r = 0; i < n; i++) {
    if (i <= r) z[i] = min(z[i - l], r - i + 1);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) {
      l = i, r = i + z[i] - 1;
    }
  }
  return z;
}
const int N = 1e6 + 5;
int seive[N];
void pre() {
  fill(seive + 2, seive + N, 1);
  for (int i = 2; i < N; i++) {
    if (seive[i]) {
      for (int j = 2; j * i <= N; j++) {
        seive[i * j] = 0;
      }
    }
  }
}
int32_t main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (__typeof(n) i = 0; i < n; ++i) cin >> a[i];
    int i = 0;
    bool fl = 0;
    --n;
    while (i < n) {
      int j = i;
      while (j < n && a[j + 1] == a[j] + 1) {
        ++j;
      }
      if (j < n && a[j] < a[j + 1]) {
        fl = 1;
        break;
      }
      if (i == j) {
        ++i;
      } else
        i = j + 1;
    }
    if (fl == 0)
      cout << "Yes";
    else
      cout << "No";
    cout << "\n";
  }
}
