#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n, i;
  cin >> t;
  while (t--) {
    cin >> n;
    long long int arr[n + 1];
    long long int position[n + 1];
    long long int count[n + 1];
    for (i = 1; i <= n; i++) count[i] = -1;
    count[0] = 0;
    arr[0] = 0;
    for (i = 1; i <= n; i++) {
      cin >> arr[i];
      position[arr[i]] = i;
    }
    for (long long int index = 1; index <= n;) {
      long long int pos = position[index];
      count[pos] = index;
      index++;
      for (i = pos + 1; i < n; i++) {
        if (count[i] == -1) {
          count[i] = index;
          index++;
        }
      }
    }
    int flag = 0;
    for (i = 1; i <= n; i++) {
      if (arr[i] == count[i]) {
        flag++;
      }
    }
    if (flag == n)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
