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