#include <bits/stdc++.h>
using namespace std;
long long tst;
void cleanData();
long long n, m, k, a[100005];
long long b[100005];
void solve() {
  cin >> n;
  map<long long, long long> mp;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    mp[a[i]] = i;
  }
  long long last = n + 1;
  while (!mp.empty()) {
    auto iter = *mp.begin();
    long long x = iter.first;
    long long pos = iter.second;
    for (int i = pos; i < last; ++i, x++) {
      if (a[i] != x) {
        cout << "No" << endl;
        return;
      }
      mp.erase(x);
    }
    last = pos;
  }
  cout << "Yes" << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  tst = 1;
  cin >> tst;
  while (tst--) {
    solve();
  }
  return 0;
}
void cleanData() {}
