Language: C++

using namespace std;
 
int main()
{
   int n;
  cin>>n;
  
  
  vector<tuple<string,int,int>> list;
  for(int i=1;i<n;i++)
    {
        string s;
        int p;
    
        cin>>s>>p;
        p=-p;
    
        
        list.push.back(tie(s,p,i));
  }
  
   sort(list.begin(),list.end());
  
  for(int i=0;i<n;i++)
  {
      cout<<get<2>(list[i])<<endl;
  
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector<tuple<string,int,int>> list;
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:9:10: error: 'tuple' was not declared in this scope
    9 |   vector<tuple<string,int,int>> list;
      |          ^~~~~
a.cc:1:1: note: 'std::tuple' is defined in header '<tuple>'; this is probably fixable by adding '#include <tuple>'
  +++ |+#include <tuple>
    1 | using namespace std;
a.cc:9:16: error: 'string' was not declared in this scope
    9 |   vector<tuple<string,int,int>> list;
      |                ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:9:23: error: expected primary-expression before 'int'
    9 |   vector<tuple<string,int,int>> list;
      |                       ^~~
a.cc:12:15: error: expected ';' before 's'
   12 |         string s;
      |               ^~
      |               ;
a.cc:15:14: error: 's' was not declared in this scope
   15 |         cin>>s>>p;
      |              ^
a.cc:19:9: error: 'list' was not declared in this scope
   19 |         list.push.back(tie(s,p,i));
      |         ^~~~
a.cc:1:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
  +++ |+#include <list>
    1 | using namespace std;
a.cc:19:24: error: 'tie' was not declared in this scope
   19 |         list.push.back(tie(s,p,i));
      |                        ^~~
a.cc:19:24: note: 'std::tie' is defined in header '<tuple>'; this is probably fixable by adding '#include <tuple>'
a.cc:22:9: error: 'list' was not declared in this scope
   22 |    sort(list.begin(),list.end());
      |         ^~~~
a.cc:22:9: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
a.cc:22:4: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |    sort(list.begin(),list.end());
      |    ^~~~
      |    short
a.cc:26:7: error: 'cout' was not declared in this scope
   26 |       cout<<get<2>(list[i])<<endl;
      |       ^~~~
a.cc:26:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:13: error: 'get' was not declared in this scope
   26 |       cout<<get<2>(list[i])<<endl;
      |             ^~~
a.cc:26:30: error: 'endl' was not declared in this scope
   26 |       cout<<get<2>(list[i])<<endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;