#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int inf = INT_MAX;
const int ninf = INT_MIN;
const int mod = 1e9 + 7;
const int N = 1e6 + 2;
int main() {
  int tt;
  scanf("%d", &tt);
  while (tt--) {
    int n;
    scanf("%d", &n);
    vector<int> p(n);
    for (auto& i : p) scanf("%d", &i);
    vector<int> blocks = {n + 1};
    bool ok = 1;
    for (int i = 0; i < (int)n; i++) {
      if (p[i] < blocks.back())
        blocks.push_back(p[i]);
      else if (p[i] != blocks.back() + 1) {
        ok = 0;
        break;
      } else
        ++blocks.back();
    }
    if (ok)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
