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