#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
template <class T>
using min_queue = priority_queue<T, vector<T>, greater<T>>;
template <class T>
int sz(const T &first) {
  return (int)first.size();
}
template <class T>
ostream &operator<<(ostream &os, vector<T> &v) {
  os << "\n[";
  for (T &first : v) os << first << ',';
  return os << "]\n";
}
struct pairhash {
 public:
  template <typename T1, typename T2>
  size_t operator()(const pair<T1, T2> &p) const {
    size_t lhs = hash<T1>()(p.first);
    size_t rhs = hash<T2>()(p.second);
    return lhs ^ (rhs + 0x9e3779b9 + (lhs << 6) + (lhs >> 2));
  }
};
void run() {
  long long tests = 0;
  cin >> tests;
  for (long long test = 0; test < tests; test++) {
    long long n;
    cin >> n;
    vector<long long> A(n + 1, 0);
    for (long long i = 0; i < n; i++) {
      long long a;
      cin >> a;
      a--;
      A[i] = a;
    }
    bool pos = true;
    for (long long i = 0; i < n; i++) {
      if (A[i + 1] > A[i] + 1) {
        pos = false;
      }
    }
    if (pos) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed << setprecision(20);
  run();
  return 0;
}
