#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int t, n, p[maxn];
int main() {
  cin >> t;
  while (t--) {
    cin >> n;
    int flag = 0;
    for (int i = 1; i <= n; i++) cin >> p[i];
    for (int i = 2; i <= n; i++)
      if (p[i] - p[i - 1] >= 2) {
        flag = 1;
        break;
      }
    if (flag)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
  }
  return 0;
}
