#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using ti = tuple<int, int, int>;
using ull = unsigned long long;
const int MAX = 101010;
const int INF = 2e9;
const int ALP = 26;
const int SZ = 1 << 18;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
const int ST_MAX = 1 << 18;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (0); i < (n); ++i) cin >> a[i];
  for (int i = (0); i < (n - 1); ++i) {
    if (a[i] < a[i + 1] && a[i + 1] - a[i] != 1) {
      cout << "No\n";
      return;
    }
  }
  cout << "Yes\n";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int tc;
  cin >> tc;
  for (int i = 1; i <= tc; ++i) solve();
  return 0;
}
