#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long t;
  cin >> t;
  for (long long _ = 0; _ < t; ++_) {
    long long n;
    cin >> n;
    vector<long long> a(n + 1);
    for (long long i = 0; i < n; ++i) {
      cin >> a[i];
    }
    long long l = a[0];
    long long r = n;
    long long cur = l;
    string ans = "Yes";
    for (long long i = 0; i < n; ++i) {
      if (a[i] != cur) {
        ans = "No";
      }
      ++cur;
      if (a[i] == r) {
        r = l - 1;
        l = a[i + 1];
        cur = l;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
