
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll t, n, po[100001];
stack<ll> st;
int main() {
cin >> t;
while (t--) {
stack<ll> st;
cin >> n;
for (int i = 1; i <= n; i++) cin >> po[i];
int h = 1;
for (int i = 1; i <= n; i++) {
st.push(i);
while (st.top() == po[h]) {
st.pop();
h++;
if (st.empty())
break;
}
}
if (st.empty())
cout << "Yes" << endl;
else
cout << "No" << endl;
}
return 0;
}
样例已过,0分求调,违规紫衫