#include <bits/stdc++.h>
using namespace std;
int t, a[100010], pos[100010];
int main() {
  scanf("%d", &t);
  while (t--) {
    int n, k = 1;
    scanf("%d", &n);
    int r = n;
    for (int i = 1; i <= n; i++) {
      scanf("%d", a + i);
      pos[a[i]] = i;
    }
    for (int i = 1; i < n; i++) {
      if (pos[i + 1] != pos[i] + 1) {
        if (pos[i] == r) {
          r = n - i;
        } else {
          k = 0;
        }
      }
    }
    if (k) {
      printf("Yes\n");
    } else {
      printf("No\n");
    }
  }
}
