#include <bits/stdc++.h>
using namespace std;
bool sortinrev(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.first > b.first);
}
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]] = i;
  }
  long long p = 1;
  long long end = n;
  while (end != 0) {
    long long k = mp[p];
    for (long long i = k; i < end; i++) {
      if (a[i] != p) {
        cout << "No"
             << "\n";
        return;
      }
      p++;
    }
    end = k;
  }
  cout << "Yes"
       << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
