#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10, M = N * N;
int n, t;
int w[N];
int main() {
  cin >> t;
  for (int pi = 1; pi <= t; pi++) {
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> w[i];
    bool flag = true;
    for (int i = 2; i <= n; i++) {
      if (w[i] > w[i - 1]) {
        if (w[i] - 1 != w[i - 1]) {
          flag = false;
          break;
        }
      }
    }
    if (flag)
      puts("Yes");
    else
      puts("No");
  }
  return 0;
}
