#include <bits/stdc++.h>
using namespace std;
int a[1000001];
int main() {
  int n, m;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    int ok = 1;
    scanf("%d", &m);
    for (int j = 1; j <= m; ++j) scanf("%d", &a[j]);
    for (int j = 2; j <= m; ++j) {
      if (a[j] - a[j - 1] >= 2) {
        printf("No\n");
        ok = 0;
        break;
      }
    }
    if (ok == 1) printf("Yes\n");
  }
  return 0;
}
