#include <bits/stdc++.h>
using namespace std;
ifstream fin("file.in");
ofstream fout("file.out");
const int NMAX = 100005;
int T, N;
int a[NMAX];
int pos[NMAX];
bool mzg[NMAX];
int main() {
  cin >> T;
  for (int i = 1; i <= T; ++i) {
    cin >> N;
    for (int i = 1; i <= N; ++i) {
      cin >> a[i];
      pos[a[i]] = i;
    }
    for (int i = 1; i <= N; ++i) mzg[i] = false;
    bool ok = true;
    for (int i = 1; i <= N; ++i) {
      int p = pos[i];
      mzg[p] = true;
      for (int j = p + 1; j <= N && !mzg[j]; ++j) {
        if (a[j] == a[j - 1] + 1) {
          mzg[j] = true;
          ++i;
        } else {
          ok = false;
          break;
        }
      }
    }
    (ok) ? cout << "Yes\n" : cout << "No\n";
  }
  return 0;
}
