#include <bits/stdc++.h>
using namespace std;
long long int recpow(long long int x, long long int n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return recpow((x * x) % 1000000007, n / 2);
  else
    return (x * recpow((x * x) % 1000000007, (n - 1) / 2)) % 1000000007;
}
bool sortbysec(
    const pair<pair<long long int, long long int>, long long int> &a,
    const pair<pair<long long int, long long int>, long long int> &b) {
  if (a.second == b.second)
    return (a.first.second < b.first.second);
  else
    return (a.second > b.second);
}
string rev(string s) {
  string t;
  for (long long int i = s.length() - 1; i >= 0; i--) {
    t.push_back(s[i]);
  }
  return t;
}
bool comp(pair<long long int, long long int> a,
          pair<long long int, long long int> b) {
  if (a.first == b.first)
    return a.second < b.second;
  else
    return a.first < b.first;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n];
    map<long long int, long long int> m;
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
      m[a[i]] = i;
    }
    long long int c = 1, r = 1, k = n;
    while (c <= n) {
      long long int in = m[c];
      long long int in2 = in;
      while (in < k) {
        if (a[in] != c) {
          r = 0;
          break;
        }
        in++;
        c++;
      }
      k = in2;
      if (r == 0) break;
    }
    if (r == 0) {
      cout << "No"
           << "\n";
    } else {
      cout << "Yes"
           << "\n";
    }
  }
  return 0;
}
