#include <bits/stdc++.h>
template <typename Tp>
void read(Tp &res) {
  static char ch;
  ch = getchar(), res = 0;
  static bool flag;
  flag = 0;
  while (!isdigit(ch)) flag = (ch == '-'), ch = getchar();
  while (isdigit(ch)) res = res * 10 + ch - 48, ch = getchar();
  if (flag) res = -res;
}
const int maxn = 1e5 + 19;
int n, a[maxn];
int main() {
  int T;
  read(T);
  while (T--) {
    read(n);
    for (int i = 1; i <= n; ++i) read(a[i]);
    bool ans = 1;
    for (int i = 1, j = n + 1; i <= n; ++i) {
      int l = i, r = i;
      while (r < n && a[r + 1] == a[r] + 1) ++r;
      if (a[r] >= j) {
        ans = 0;
        break;
      } else
        i = r, j = a[l];
    }
    puts(ans ? "Yes" : "No");
  }
}
