#include <bits/stdc++.h>
using namespace std;
int t, n, x;
int poz[100005], lst[100005], nxt[100005], cnt[100005];
multiset<int> s;
void sc(int nr) {
  auto it = s.find(nr);
  s.erase(it);
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  for (; t; t--) {
    cin >> n;
    for (int i = 1; i <= n; i++)
      cin >> x, poz[x] = i, cnt[i] = 1, lst[i] = i - 1, nxt[i] = i + 1;
    int mx = 1, ok = 1;
    if (n == 1) {
      cout << "Yes\n";
      continue;
    }
    for (int i = 1; i <= n; i++) s.insert(1);
    for (int i = 1; i <= n; i++) {
      int j = poz[i];
      auto it = s.end();
      it--;
      if (cnt[j] != *it) {
        ok = 0;
        break;
      }
      nxt[lst[j]] = nxt[j];
      lst[nxt[j]] = lst[j];
      cnt[nxt[j]] += cnt[j];
      sc(cnt[j]);
      if (nxt[j] <= n) s.insert(cnt[nxt[j]]);
    }
    s.clear();
    cout << (ok == 0 ? "No\n" : "Yes\n");
  }
  return 0;
}
