#include <bits/stdc++.h>
using namespace std;
const int N = int(1e5) + 10;
const int INF = int(2e9) + 5;
const long long INF64 = 1e18;
int a[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    bool cor = true;
    for (int i = 1; i < n; i++) {
      if (a[i + 1] == a[i] + 1 || a[i + 1] < a[i]) {
        continue;
      }
      cor = false;
      break;
    }
    if (cor) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
