Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  vector<pair<string, int>, int> list(N);
  string s;
  int p;
  for (int i = 0; i < N; i++) {
    cin >> s >> p;
    list.at(i) = make_pair(make_pair(s, -x), i + 1);
  }
  sort (list.begin(), list.end());
  for (int i = 0; i < N; i++) {
    cout << list.second << endl;
  }
  return 0;
}

Compiler output:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, int>':
/usr/include/c++/14/bits/stl_vector.h:428:11:   required from 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int>, int>'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
a.cc:7:40:   required from here
    7 |   vector<pair<string, int>, int> list(N);
      |                                        ^
/usr/include/c++/14/bits/stl_vector.h:87:28: error: 'int' is not a class, struct, or union type
   87 |         rebind<_Tp>::other _Tp_alloc_type;
      |                            ^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:89:9: error: 'int' is not a class, struct, or union type
   89 |         pointer;
      |         ^~~~~~~
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int>, int>':
a.cc:7:40:   required from here
    7 |   vector<pair<string, int>, int> list(N);
      |                                        ^
/usr/include/c++/14/bits/stl_vector.h:518:20: error: '_M_allocate' has not been declared in 'std::vector<std::pair<std::__cxx11::basic_string<char>, int>, int>::_Base'
  518 |       using _Base::_M_allocate;
      |                    ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:519:20: error: '_M_deallocate' has not been declared in 'std::vector<std::pair<std::__cxx11::basic_string<char>, int>, int>::_Base'
  519 |       using _Base::_M_deallocate;
      |                    ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:521:20: error: '_M_get_Tp_allocator' has not been declared in 'std::vector<std::pair<std::__cxx11::basic_string<char>, int>, int>::_Base'
  521 |       using _Base::_M_get_Tp_allocator;
      |                    ^~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:12:10: error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int>, int>' has no member named 'at'; did you mean 'data'?
   12 |     list.at(i) = make_pair(make_pair(s, -x), i + 1);
      |          ^~
      |          data
a.cc:12:42: error: 'x' was not declared in this scope
   12 |     list.at(i) = make_pair(make_pair(s, -x), i + 1);
      |                                          ^
a.cc:14:14: error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int>, int>' has no member named 'begin'
   14 |   sort (list.begin(), list.end());
      |              ^~~~~
a.cc:14:28: error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int>, int>' has no member named 'end'
   14 |   sort (list.begin(), list.end());
      |                            ^~~
a.cc:16:18: error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int>, int>' has no member named 'second'
   16 |     cout << list.second << endl;
      |                  ^~~~~~