#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main() {
  int t;
  cin >> t;
  int n;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int k = 0, m = n;
    bool ans = true;
    while (k < n) {
      if (a[k] == m) {
        --m;
        ++k;
        continue;
      }
      int tmp = a[k] - 1;
      while (k < n - 1 && a[k + 1] - a[k] == 1) {
        k++;
      }
      if (a[k] != m) {
        ans = false;
        break;
      }
      m = tmp;
      ++k;
    }
    printf("%s\n", ans ? "Yes" : "No");
  }
}
