#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, a, b;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    bool res = true;
    cin >> n;
    cin >> a;
    for (int i = 1; i < n; ++i) {
      cin >> b;
      if (a < b && b - a > 1) res = false;
      a = b;
    }
    cout << (res ? "Yes\n" : "No\n");
  }
  return 0;
}
