#include <bits/stdc++.h>
using namespace std;
int a[100005];
int t, n;
int main() {
  ios::sync_with_stdio(0);
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    bool bla = 0;
    for (int i = 0; i < n - 1; i++) {
      if ((a[i + 1] > a[i]) && (a[i + 1] != a[i] + 1)) bla = 1;
    }
    if (bla)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
  }
  return 0;
}
