#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 5;
long long a[N], pos[N];
long long n;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t = 1;
  cin >> t;
  while (t--) {
    cin >> n;
    for (long long i = 1; i <= n; i++) cin >> a[i];
    long long ok = 1;
    for (long long i = 1; i + 1 <= n; i++) {
      if (a[i + 1] == a[i] + 1 || a[i + 1] < a[i]) continue;
      ok = 0;
    }
    if (ok)
      cout << "Yes"
           << "\n";
    else
      cout << "No"
           << "\n";
  }
  return 0;
}
