#include <bits/stdc++.h>
using namespace std;
vector<long long int> a(100005);
int calc(long long int i, long long int maxval, long long int n) {
  if (maxval == a[i] && i == n - 1) return 1;
  if (maxval == a[i]) {
    return calc(i + 1, maxval - 1, n);
  } else {
    long long int val = a[i];
    while (maxval > a[i]) {
      if (a[i + 1] != a[i] + 1) return 0;
      i++;
    }
    if (i == n - 1) return 1;
    return calc(i + 1, val - 1, n);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  std::cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, i, j, p, k, m, ans = 0;
    cin >> n;
    for (i = 0; i < n; i++) {
      cin >> a[i];
    }
    if (calc(0, n, n) == 1)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
