#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
bool test = 1;
void solve() {
  int n, i, j;
  cin >> n;
  int a[n];
  for (long long i = (0); i < (n); i++) cin >> a[i];
  j = 0;
  while (j < n - 1) {
    if (a[j + 1] < a[j])
      j++;
    else if (a[j + 1] == a[j] + 1)
      j++;
    else
      break;
  }
  if (j == n - 1)
    cout << "Yes\n";
  else
    cout << "No\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  if (test) cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
