void solve()
{
int n,k;
cin>>n>>k;
int a[n];
vector<pii>v;
for(int i=0;i<n;i++){
cin>>a[i];
v.pb({a[i],i});
}
sort(v.begin(),v.end());
int z=0;
for(int i=0;i<n-1;i++){
if(v[i+1].ss!=v[i].ss+1)z++;
}
if(z>0)z++;
deb(z);
if(z>k)cout<<"No"<<endl;
else cout<<"Yes"<<endl;
}
what's wrong with this code? I don't understand why it is giving the wrong answer.