What is wrong with this code

#include
#include
#include
using namespace std;
bool cmp(pair<string,int>a,pair<string,int>b)
{
if(a.second==b.second)
return a.first<b.first;
return a.second>b.second;
}
int main() {
int n,a;
string s;
cin>>n;
long long int c;
cin>>c;
pair<string,int> arr[c];
for(int i=0;i<c;i++)
{
getline(cin,s);
cin>>a;
arr[i]=make_pair(s,a);
}
sort(arr,arr+c,cmp);
for(int i=0;i<c;i++)
{ if(arr[i].second > n){
cout<<arr[i].first<<" "<<arr[i].second;
}
else{
continue;
}
}
return 0;
}

@Kunalgoyal if you will use getline then it will be taking the whole line as a string.
so better take input of name in a string and for salary in a int.
like cin>>str>>a

Also you need to print the names and sal for people having sal >= n , you are missing ‘=’ sign.

If you need, then you can also have a look at this modified code of yours https://ide.codingblocks.com/s/241945

@Kunalgoyal please mark the doubt as resolved if you are able to understand it now. Otherwise you can ask your doubt if it remains.