Why my test case is not passing

#include<bits/stdc++.h>
using namespace std;

struct score{
string name;
int value;
};
bool compare(score a,score b)
{
if(a.value==b.value)
{
return a.name<b.name;
}
else
return a.value>b.value;
}
int main() {
int limit;
cin>>limit;
int n;
cin>>n;
score a[n];
for(int i=0;i<n;i++)
{
cin>>a[i].name>>a[i].value;
}
sort(a,a+n,compare);
for(int i=0;i<n;i++)
{
if(a[i].value>limit)
cout<<a[i].name<<" "<<a[i].value<<endl;
}

return 0;

}

@ayushwahi3005 List contains only names of those employees having salary greater than or equal to a given number x. So use this condition at end while printing the output if(a[i].value>=limit)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.