#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (long long i = 0; i <= n - 1; i++) cin >> a[i];
    long long fg = 1;
    vector<long long> mark(n + 2, 0);
    mark[n + 1] = 1;
    for (long long i = 0; i <= n - 1; i++) {
      mark[a[i]] = 1;
      if (a[i] == n)
        continue;
      else {
        while (i + 1 < n && mark[a[i] + 1] == 0) {
          mark[a[i] + 1] = 1;
          if (a[i + 1] != a[i] + 1) fg = 0;
          i++;
        }
      }
    }
    for (long long i = 1; i <= n; i++) {
      if (mark[i] != 1) fg = 0;
    }
    if (fg)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
