#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int T, n, p[N];
int main() {
  for (scanf("%d", &T); T; T--) {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &p[i]);
    }
    bool ok = true;
    int Min = n + 1;
    for (int i = 1; i <= n; i++) {
      if (p[i] < Min) {
        Min = p[i];
      } else if (p[i] != p[i - 1] + 1) {
        ok = false;
        break;
      }
    }
    puts(ok ? "Yes" : "No");
  }
  return 0;
}
