#include <bits/stdc++.h>
using namespace std;
void f() {
  int n, a, f = 1;
  cin >> n;
  vector<int> v;
  cin >> a;
  v.push_back(a);
  for (int i = 1; i < n; i++) {
    cin >> a;
    v.push_back(a);
    if (v[i] - v[i - 1] > 1) {
      f = 0;
    }
  }
  v.clear();
  if (f == 1)
    cout << "Yes";
  else
    cout << "No";
  cout << endl;
  return;
}
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    f();
  }
}
