#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long p[n], f = 1, strt;
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  bool ok = true;
  for (int i = 0; i < n - 1; i++)
    if (p[i] < p[i + 1] && p[i + 1] != p[i] + 1) ok = false;
  cout << (ok ? "Yes" : "No");
}
int main() {
  int q;
  cin >> q;
  while (q--) {
    solve();
    cout << endl;
  }
}
