https://chat.openai.com/share/1a3ded6e-ca6f-4fee-b4f7-3035c551c6bc
bool myFirstCustomComp (pair<int,int> a, pair<int,int>b) //duita element ki ki type to sort
{
if (a.first == b.first)
{
if ( a.second > b.second) return true;
else return false;
}
else
{
if (a.first > b.first) return false;
else return true;
}
}
//comparator always call hobe
int main ()
{
vector <pair<int, int>> v;
sort (v.begin(), v.end()), myFirstCustomComp);//no ()
}