#include <bits/stdc++.h>
using namespace std;
void solve() {
  int N;
  cin >> N;
  int tab[N];
  for (int i = 0; i < N; i++) {
    cin >> tab[i];
  }
  for (int i = 0; i < N - 1; i++) {
    if (tab[i + 1] - tab[i] > 1) {
      cout << "No\n";
      return;
    }
  }
  cout << "Yes\n";
}
int main() {
  int T;
  cin >> T;
  for (int i = 0; i < T; i++) {
    solve();
  }
}
