#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    bool ch = 0;
    vector<int> v;
    cin >> n;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      v.push_back(x);
    }
    for (int i = 1; i < n; i++) {
      if (v[i] > v[i - 1] && v[i - 1] + 1 != v[i]) ch = 1;
    }
    if (ch)
      cout << "No\n";
    else
      cout << "Yes\n";
  }
}
