#include <bits/stdc++.h>
using namespace std;
long long modpow(long long base, long long exponent, long long modulus) {
  if (base == 0 && exponent == 0) return 0;
  long long result = 1;
  while (exponent > 0) {
    if (exponent % 2 == 1) result = (result * base) % modulus;
    exponent = exponent >> 1;
    base = (base * base) % modulus;
  }
  return result;
}
int N, location[2001010];
inline void ReadInput(void) {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    int a;
    scanf("%d", &a);
    location[a] = i;
  }
}
inline void solve(void) {
  for (int i = 2; i <= N; i++) {
    if (location[i] == location[i - 1] + 1 or location[i] < location[i - 1])
      continue;
    else {
      cout << "No\n";
      return;
    }
  }
  cout << "Yes\n";
}
inline void Refresh(void) {}
int main() {
  int t = 1;
  scanf("%d", &t);
  while (t--) {
    ReadInput();
    solve();
  }
  return 0;
}
