#include <bits/stdc++.h>
using namespace std;
long long a[100005], p[100005], cums[100005];
int main() {
  long long tc, n;
  scanf("%lld", &tc);
  for (long long cs = 1; cs <= tc; ++cs) {
    scanf("%lld", &n);
    for (long long i = 1; i <= n; ++i) {
      scanf("%lld", &a[i]);
      p[a[i]] = i;
    }
    bool ok = 1;
    long long now = 1, cnt = 0, ind, r = n, x;
    while (r >= 1) {
      ind = p[now];
      x = ind;
      now++;
      for (long long i = ind + 1; i <= r; i++) {
        if (a[i] - a[i - 1] != 1) {
          ok = 0;
          break;
        } else {
          now++;
        }
      }
      r = x - 1;
      if (!ok) break;
    }
    if (ok) {
      printf("Yes\n");
    } else {
      printf("No\n");
    }
  }
  return 0;
}
