#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, i, j, x, y, a[100005], v[100005];
    map<long long int, long long int> ma;
    cin >> n;
    for (i = 1; i <= n; i++) {
      cin >> a[i];
      ma[a[i]] = i;
      v[i] = 0;
    }
    long long int fl = 0, p = -1;
    for (i = 1; i <= n; i++) {
      if (!v[ma[i]]) {
        for (j = ma[i]; j <= n; j++) {
          if (v[j] == 1 || j == n + 1) {
            break;
          }
          if (a[j] != j - ma[i] + i) {
            fl = 1;
            break;
          }
          v[j] = 1;
        }
      }
    }
    if (fl) {
      cout << "No\n";
    } else {
      cout << "Yes\n";
    }
  }
  return 0;
}
