#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n + 10), q(n + 10);
  vector<bool> was(n + 10);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    x--;
    v[x] = i;
    q[i] = x;
  }
  bool isOk = 1;
  for (int i = 0; i < n; i++) {
    int j = v[i];
    while (j < n) {
      if (j < n - 1 && q[j] + 1 < q[j + 1]) {
        isOk = 0;
      }
      was[j] = 1;
      if (j < n - 1 && was[j + 1]) break;
      j++;
    }
  }
  if (isOk)
    cout << "Yes\n";
  else
    cout << "No\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) solve();
}
