#include <bits/stdc++.h>
using namespace std;
int t, n, a[(int)1e5 + 9], v[(int)1e5 + 9];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      v[a[i]] = i;
    }
    a[n] = -1;
    bool czy = 0;
    for (int i = 1; i <= n; i++) {
      int j = v[i];
      while (a[j] != -1) {
        if ((a[j + 1] != -1) && (a[j + 1] - a[j] != 1)) {
          cout << "No" << endl;
          czy = 1;
          break;
        }
        a[j] = -1;
        j++;
      }
      if (czy) break;
    }
    if (!czy) cout << "Yes" << endl;
  }
  return 0;
}
