Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define eb emplace_back
#define pb push_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define chmin(x,y) if(x>y)x=y
#define chmax(x,y) if(x<y)x=y
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef tuple<ll,ll,ll,ll> PPP;
typedef priority_queue<ll> PQ;
typedef priority_queue<ll,vector<ll>,greater<ll>> SPQ;
using vi=vector<ll>;
using vvi=vector<vector<ll>>;
using vc=vector<char>;
using vvc=vector<vector<char>>;
const ll inf=100100100100;
const int Inf=1001001001;
const int mod=1000000007;
const double pi=3.141592653589793;

int main(){
    int n;cin>>n;
    vector<tuple<string,int,int>> v;
    rep(i,n){
        string s;
        int a;
        cin>>s>>a;
        v.eb(PP(s,a,i+1));
    }
    sort(all(v));
    rep(i,n){
        cout<<get<2>(v)<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:24: error: no matching function for call to 'std::tuple<long long int, long long int, long long int>::tuple(std::string&, int&, long long int)'
   33 |         v.eb(PP(s,a,i+1));
      |                        ^
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:1646:9: note: candidate: 'template<class _Alloc, class ... _UElements, bool _Valid, typename std::enable_if<std::tuple<long long int, long long int, long long int>::_TCC<_Valid>::__is_explicitly_constructible<_UElements ...>(), bool>::type <anonymous> > std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, std::tuple<_Args2 ...>&&) [with _UElements = _Alloc; bool _Valid = {_UElements ...}; typename std::enable_if<_TCC<_Valid>::__is_explicitly_constructible<_UElements ...>(), bool>::type <anonymous> = _Valid; _Elements = {long long int, long long int, long long int}]'
 1646 |         tuple(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~
/usr/include/c++/14/tuple:1646:9: note:   template argument deduction/substitution failed:
a.cc:33:24: note:   mismatched types 'std::tuple<_Elements ...>' and 'long long int'
   33 |         v.eb(PP(s,a,i+1));
      |                        ^
/usr/include/c++/14/tuple:1634:9: note: candidate: 'template<class _Alloc, class ... _UElements, bool _Valid, typename std::enable_if<std::tuple<long long int, long long int, long long int>::_TCC<_Valid>::__is_implicitly_constructible<_UElements ...>(), bool>::type <anonymous> > std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, std::tuple<_Args2 ...>&&) [with _UElements = _Alloc; bool _Valid = {_UElements ...}; typename std::enable_if<_TCC<_Valid>::__is_implicitly_constructible<_UElements ...>(), bool>::type <anonymous> = _Valid; _Elements = {long long int, long long int, long long int}]'
 1634 |         tuple(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~
/usr/include/c++/14/tuple:1634:9: note:   template argument deduction/substitution failed:
a.cc:33:24: note:   mismatched types 'std::tuple<_Elements ...>' and 'long long int'
   33 |         v.eb(PP(s,a,i+1));
      |                        ^
/usr/include/c++/14/tuple:1623:9: note: candidate: 'template<class _Alloc, class ... _UElements, bool _Valid, typename std::enable_if<std::tuple<long long int, long long int, long long int>::_TCC<_Valid>::__is_explicitly_constructible<const _UElements& ...>(), bool>::type <anonymous> > std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, const std::tuple<_Args2 ...>&) [with _UElements = _Alloc; bool _Valid = {_UElements ...}; typename std::enable_if<_TCC<_Valid>::__is_explicitly_constructible<const _UElements& ...>(), bool>::type <anonymous> = _Valid; _Elements = {long long int, long long int, long long int}]'
 1623 |         tuple(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~
/usr/include/c++/14/tuple:1623:9: note:   template argument deduction/substitution failed:
a.cc:33:24: note:   mismatched types 'const std::tuple<_Elements ...>' and 'long long int'
   33 |         v.eb(PP(s,a,i+1));
      |                        ^
/usr/include/c++/14/tuple:1611:9: note: candidate: 'template<class _Alloc, class ... _UElements, bool _Valid, typename std::enable_if<std::tuple<long long int, long long int, long long int>::_TCC<_Valid>::__is_implicitly_constructible<const _UElements& ...>(), bool>::type <anonymous> > std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, const std::tuple<_Args2 ...>&) [with _UElements = _Alloc; bool _Valid = {_UElements ...}; typename std::enable_if<_TCC<_Valid>::__is_implicitly_constructible<const _UElements& ...>(), bool>::type <anonymous> = _Valid; _Elements = {long long int, long long int, long long int}]'
 1611 |         tuple(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~
/usr/include/c++/14/tuple:1611:9: note:   template argument deduction/substitution failed:
a.cc:33:24: note:   mismatched types 'const std::tuple<_Elements ...>' and 'long long int'
   33 |         v.eb(PP(s,a,i+1));
      |                        ^
/usr/include/c++/14/tuple:1603:9: note: candidate: 'template<class _Alloc> std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, std::tuple< <template-parameter-1-1> >&&) [with _Elements = {long long int, long long int, long long int}]'
 1603 |         tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in)
      |         ^~~~~
/usr/include/c++/14/tuple:1603:9: note:   template argument deduction/substitution failed:
a.cc:33:17: note:   cannot convert 's' (type 'std::string' {aka 'std::__cxx11::basic_string<char>'}) to type 'std::allocator_arg_t'
   33 |         v.eb(PP(s,a,i+1));
      |                 ^
/usr/include/c++/14/tuple:1598:9: note: candidate: 'template<class _Alloc> std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, const std::tuple< <template-parameter-1-1> >&) [with _Elements = {long long int, long long int, long long int}]'
 1598 |         tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in)
      |         ^~~~~
/usr/include/c++/14/tuple:1598:9: note:   template argument deduction/substitution failed:
a.cc:33:17: note:   cannot convert 's' (type 'std::string' {aka 'std::__cxx11::basic_string<char>'}) to type 'std::allocator_arg_t'
   33 |         v.eb(PP(s,a,i+1));
      |                 ^
/usr/include/c++/14/tuple:1591:9: note: candidate: 'template<class _Alloc, class ... _UElements, bool _Valid, typename std::enable_if<std::tuple<long long int, long long int, long long int>::_TCC<_Valid>::__is_explicitly_constructible<_UElements ...>(), bool>::type <anonymous> > std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, _UElements&& ...) [with _UElements = _Alloc; bool _Valid = {_UElements ...}; typename std::enable_if<_TCC<_Valid>::__is_explicitly_constructible<_UElements ...>(), bool>::type <anonymous> = _Valid; _Elements = {long long int, long long int, long long int}]'
 1591 |         tuple(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~
/usr/include/c++/14/tuple:1591:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/tuple:1588:55: error: no type named 'type' in 'struct std::enable_if<false, bool>'
 1588 |                _ExplicitCtor<_Valid, _UElements...> = false>
      |                                                       ^~~~~
/usr/include/c++/14/tuple:1581:9: note: candidate: 'template<class _Alloc, class ... _UElements, bool _Valid, typename std::enable_if<std::tuple<long long int, long long int, long long int>::_TCC<_Valid>::__is_implicitly_constructible<_UElements ...>(), bool>::type <anonymous> > std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, _UElements&& ...) [with _UElements = _Alloc; bool _Valid = {_UElements ...}; typename std::enable_if<_TCC<_Valid>::__is_implicitly_constructible<_UElements ...>(), bool>::type <anonymous> = _Valid; _Elements = {long long int, long long int, long long int}]'
 1581 |         tuple(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~
/usr/include/c++/14/tuple:1581:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/tuple:1579:55: error: no type named 'type' in 'struct std::enable_if<false, bool>'
 1579 |                _ImplicitCtor<_Valid, _UElements...> = true>
      |                                                       ^~~~
/usr/include/c++/14/tuple:1573:9: note: candidate: 'template<class _Alloc, bool _NotEmpty, typename std::enable_if<std::tuple<long long int, long long int, long long int>::_TCC<_Valid>::__is_explicitly_constructible<const long long int&, const long long int&, const long long int&>(), bool>::type <anonymous> > std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, const _Elements& ...) [with bool _NotEmpty = _Alloc; typename std::enable_if<_TCC<_Valid>::__is_explicitly_constructible<const _Elements& ...>(), bool>::type <anonymous> = _NotEmpty; _Elements = {long long int, long long int, long long int}]'
 1573 |         tuple(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~
/usr/include/c++/14/tuple:1573:9: note:   candidate expects 5 arguments, 3 provided
/usr/include/c++/14/tuple:1565:9: note: candidate: 'template<class _Alloc, bool _NotEmpty, typename std::enable_if<std::tuple<long long int, long long int, long long int>::_TCC<_Valid>::__is_implicitly_constructible<const long long int&, const long long int&, const long long int&>(), bool>::type <anonymous> > std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&, const _Elements& ...) [with bool _NotEmpty = _Alloc; typename std::enable_if<_TCC<_Valid>::__is_implicitly_constructible<const _Elements& ...>(), bool>::type <anonymous> = _NotEmpty; _Elements = {long long int, long long int, long long int}]'
 1565 |         tuple(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~
/usr/include/c++/14/tuple:1565:9: note:   candidate expects 5 arguments, 3 provided
/usr/include/c++/14/tuple:1559:9: note: candidate: 'template<class _Alloc, typename std::enable_if<std::tuple<long long int, long long int, long long int>::_TCC<((bool)std::is_object<_Tp>::value)>::__is_explicitly_default_constructible(), bool>::type <anonymous> > std::tuple< <template-parameter-1-1> >::tuple(std::allocator_arg_t, const _Alloc&) [with typename std::enable_if<_TCC<((bool)std::is_object<_Alloc>::value)>::__is_explicitly_default_constructible(), bool>::type <anonymous> = _Alloc; _Elements = {long long int, long long int, long long int}]'
 1559 |         tuple(allocator_arg_t __tag, const _Alloc& __a)
      |         ^~~~~
/usr/include/c++/14/tuple:1559:9: note:   candidate expects 2 arguments, 3 provided
/usr/include/c++/14/tuple:1552:9: note: candidate: 'template<class _Alloc, typename std::enable