#include <bits/stdc++.h>
using namespace std;
const int len = 1e5 + 10;
int t, n, key, last, p[len];
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &p[i]);
    }
    key = 0;
    last = p[n];
    for (int i = n - 1; i >= 1; i--) {
      if (p[i] == p[i + 1] - 1) {
        continue;
      }
      if (p[i] > last) {
        last = p[i];
      } else {
        key = 1;
        break;
      }
    }
    if (key) {
      printf("No\n");
    } else {
      printf("Yes\n");
    }
  }
  return 0;
}
