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