#include
#include
using namespace std;
int main()
{
int x;
int n;
cin >> x;
cout << endl;
cin >> n;
string name[n];
int salary[n];
for (int i = 0; i < n; i++)
{
cin >> name[i];
cin >> salary[n];
}
int salary_1[100];
int count = 0;
for (int i = 0; i < n; i++)
{
if (salary[i]<x)
{
salary_1[count]=salary[i];
count++;
}
}
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (name[i]==name[j])
{
sort(name,name+n);
sort(salary_1,salary_1+count);
cout<<name<<" "<<salary_1;
}
}
}
return 0;
}
here is my code
please tell me the correct code