#include <bits/stdc++.h>
using namespace std;
void boost() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main(void) {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> v(n);
    for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
         i += 1 - 2 * ((0) > (n)))
      cin >> v[i];
    long long flag = 0;
    for (__typeof(n) i = (1) - ((1) > (n)); i != (n) - ((1) > (n));
         i += 1 - 2 * ((1) > (n))) {
      if (v[i - 1] < v[i] && (v[i] - v[i - 1]) != 1) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) {
      cout << "No"
           << "\n";
    } else
      cout << "Yes"
           << "\n";
  }
}
