#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  int n;
  int a[100007], visited[100007] = {0}, idx[100007];
  int maxi = 0, k;
  while (t--) {
    cin >> n;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      idx[a[i]] = i;
      visited[i] = 0;
    }
    int next = idx[1] + 1;
    visited[idx[1]] = 1;
    int flag = 0;
    for (int i = 2; i <= n; i++) {
      if (next <= n && idx[i] != next && !(visited[next])) {
        flag = 1;
        break;
      }
      visited[idx[i]] = 1;
      next = idx[i] + 1;
    }
    if (flag == 1)
      cout << "No";
    else
      cout << "Yes";
    cout << "\n";
  }
}
