Language: C++

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

int main(){
  int N;
  cin >> N;
  using psi = pair<string,int>;
  vector<pair<psi,int>> p(N);
  for(int i=0;i<N;i++){
    int S,P;
    cin >> S >> P;
    auto t = make_pair(S,-P);
    auto &tmp.at(i) = make_pair(t,i);
  }
  
  sort(p.begin(),p.end());//stringの方が辞書順，intの方が昇順
  
  for(int i=0;i<N;i++){
    int z;
    tie(ignore,ignore,z)=p.at(i);
    cout << z << endl;
  }
  
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected initializer before '.' token
   13 |     auto &tmp.at(i) = make_pair(t,i);
      |              ^
a.cc:20:32: error: no match for 'operator=' (operand types are 'std::tuple<const std::_Swallow_assign&, const std::_Swallow_assign&, int&>' and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >, std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >::value_type' {aka 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>'})
   20 |     tie(ignore,ignore,z)=p.at(i);
      |                                ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/tuple:1930:9: note: candidate: 'template<class ... _UElements> std::__enable_if_t<((bool)__assignable<const _UElements& ...>()), std::tuple< <template-parameter-1-1> >&> std::tuple< <template-parameter-1-1> >::operator=(const std::tuple<_Args1 ...>&) [with _UElements = {_UElements ...}; _Elements = {const std::_Swallow_assign&, const std::_Swallow_assign&, int&}]'
 1930 |         operator=(const tuple<_UElements...>& __in)
      |         ^~~~~~~~
/usr/include/c++/14/tuple:1930:9: note:   template argument deduction/substitution failed:
a.cc:20:32: note:   '__gnu_cxx::__alloc_traits<std::allocator<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >, std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >::value_type' {aka 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>'} is not derived from 'const std::tuple<_UTypes ...>'
   20 |     tie(ignore,ignore,z)=p.at(i);
      |                                ^
/usr/include/c++/14/tuple:1940:9: note: candidate: 'template<class ... _UElements> std::__enable_if_t<((bool)__assignable<_UElements ...>()), std::tuple< <template-parameter-1-1> >&> std::tuple< <template-parameter-1-1> >::operator=(std::tuple<_Args1 ...>&&) [with _UElements = {_UElements ...}; _Elements = {const std::_Swallow_assign&, const std::_Swallow_assign&, int&}]'
 1940 |         operator=(tuple<_UElements...>&& __in)
      |         ^~~~~~~~
/usr/include/c++/14/tuple:1940:9: note:   template argument deduction/substitution failed:
a.cc:20:32: note:   '__gnu_cxx::__alloc_traits<std::allocator<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >, std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >::value_type' {aka 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>'} is not derived from 'std::tuple<_UTypes ...>'
   20 |     tie(ignore,ignore,z)=p.at(i);
      |                                ^
/usr/include/c++/14/tuple:1907:7: note: candidate: 'std::tuple< <template-parameter-1-1> >& std::tuple< <template-parameter-1-1> >::operator=(std::__conditional_t<((bool)__assignable<const _Elements& ...>()), const std::tuple< <template-parameter-1-1> >&, const std::__nonesuch&>) [with _Elements = {const std::_Swallow_assign&, const std::_Swallow_assign&, int&}; std::__conditional_t<((bool)__assignable<const _Elements& ...>()), const std::tuple< <template-parameter-1-1> >&, const std::__nonesuch&> = const std::tuple<const std::_Swallow_assign&, const std::_Swallow_assign&, int&>&]'
 1907 |       operator=(__conditional_t<__assignable<const _Elements&...>(),
      |       ^~~~~~~~
/usr/include/c++/14/tuple:1909:52: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >, std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >::value_type' {aka 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>'} to 'std::__conditional_t<true, const std::tuple<const std::_Swallow_assign&, const std::_Swallow_assign&, int&>&, const std::__nonesuch&>' {aka 'const std::tuple<const std::_Swallow_assign&, const std::_Swallow_assign&, int&>&'}
 1907 |       operator=(__conditional_t<__assignable<const _Elements&...>(),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1908 |                                 const tuple&,
      |                                 ~~~~~~~~~~~~~       
 1909 |                                 const __nonesuch&> __in)
      |                                 ~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/14/tuple:1918:7: note: candidate: 'std::tuple< <template-parameter-1-1> >& std::tuple< <template-parameter-1-1> >::operator=(std::__conditional_t<((bool)__assignable<_Elements ...>()), std::tuple< <template-parameter-1-1> >&&, std::__nonesuch&&>) [with _Elements = {const std::_Swallow_assign&, const std::_Swallow_assign&, int&}; std::__conditional_t<((bool)__assignable<_Elements ...>()), std::tuple< <template-parameter-1-1> >&&, std::__nonesuch&&> = std::tuple<const std::_Swallow_assign&, const std::_Swallow_assign&, int&>&&]'
 1918 |       operator=(__conditional_t<__assignable<_Elements...>(),
      |       ^~~~~~~~
/usr/include/c++/14/tuple:1920:47: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >, std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >::value_type' {aka 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>'} to 'std::__conditional_t<true, std::tuple<const std::_Swallow_assign&, const std::_Swallow_assign&, int&>&&, std::__nonesuch&&>' {aka 'std::tuple<const std::_Swallow_assign&, const std::_Swallow_assign&, int&>&&'}
 1918 |       operator=(__conditional_t<__assignable<_Elements...>(),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1919 |                                 tuple&&,
      |                                 ~~~~~~~~       
 1920 |                                 __nonesuch&&> __in)
      |                                 ~~~~~~~~~~~~~~^~~~