#include <bits/stdc++.h>
using namespace ::std;
int main(int argc, const char* argv[]) {
  int T;
  cin >> T;
  for (int t = 0; t < T; t++) {
    int N;
    cin >> N;
    int arr[N];
    for (int i = 0; i < N; i++) {
      cin >> arr[i];
    }
    int allowed = 1;
    int nextAllowed = arr[N - 1] + 1;
    bool isCorrect = true;
    for (int i = N - 2; i >= 0; i--) {
      if (arr[i] != arr[i + 1] - 1) {
        if (arr[i + 1] == allowed) {
          allowed = nextAllowed;
          nextAllowed = arr[i] + 1;
        } else {
          isCorrect = false;
          break;
        }
      }
    }
    if (isCorrect) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
