Sort Game Problem

What is the logic behind solving this problem
I mean how to take string and integer as input.

You can make a vector of pair like
vector<string,int> v
and every time you can push back different input format in vector v. Just don’t forget to make pair of string and int. Before pushing it in the vector.

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.