#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int T, n;
  cin >> T;
  while (T--) {
    cin >> n;
    vector<int> per(n + 2, 0);
    vector<int> pos(n + 1);
    vector<int> vis(n + 2, 0);
    for (int i = 1; i <= n; ++i) {
      cin >> per[i];
      pos[per[i]] = i;
    }
    vis[n + 1] = 1;
    int a = 1;
    int sol = 1;
    while (a <= n) {
      vis[pos[a]] = 1;
      if (per[pos[a] + 1] > a + 1) sol = 0;
      a++;
    }
    if (sol)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
