#include <bits/stdc++.h>
using namespace std;
const long long int INF = LONG_LONG_MAX >> 1;
const long long int NINF = LONG_LONG_MIN / 2;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int t;
  cin >> t;
  while (t-- > 0) {
    long long int n;
    cin >> n;
    long long int p[n];
    for (long long int& x : p) {
      cin >> x;
      --x;
    }
    long long int cnt[n];
    for (long long int i = 0; i < n; i++) cnt[i] = 1;
    vector<pair<long long int, long long int> > list;
    for (long long int i = 0; i < n; i++) {
      list.emplace_back(p[i], i);
    }
    sort((list).begin(), (list).end());
    bool ok = true;
    long long int c = 1;
    vector<bool> filled(n, false);
    for (long long int i = 0; i < n; i++) {
      if (cnt[list[i].second] == c) {
        if (list[i].second != n - 1 && cnt[list[i].second + 1] == 1) {
          c++;
          cnt[list[i].second + 1] += cnt[list[i].second];
          cnt[list[i].second] = 0;
        } else {
          c = 1;
          cnt[list[i].second] = 0;
        }
      } else {
        ok = false;
      }
    }
    if (ok)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
