#include <bits/stdc++.h>
using namespace std;
void strange(int t) {
  while (t--) {
    int n;
    cin >> n;
    vector<int> p(n);
    for (int i = 0; i < n; i++) {
      cin >> p[i];
      p[i]--;
    }
    bool g = 1;
    int MIN = n;
    for (int i = 0; i < n; i++) {
      if (p[i] < MIN)
        MIN = p[i];
      else if (p[i] == p[i - 1] + 1) {
      } else {
        g = false;
        break;
      }
    }
    cout << (g ? "Yes" : "No") << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  strange(t);
}
