#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n], x = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    bool flag = true;
    for (int i = 1; i < n; i++) {
      if (a[i] > a[i - 1] + 1) {
        flag = false;
        break;
      }
    }
    if (flag == true) {
      cout << "Yes\n";
    } else {
      cout << "No\n";
    }
  }
  return 0;
}
