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