criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: no matching function for call to 'std::vector<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >::push_back(std::pair<std::pair<int, int>, int>)'
   11 |     a.push_back(make_pair(make_pair(s,-1*p),i));
      |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>; _Alloc = std::allocator<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >; value_type = std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'std::pair<std::pair<int, int>, int>' to 'const std::vector<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >::value_type&' {aka 'const std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>; _Alloc = std::allocator<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >; value_type = std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'std::pair<std::pair<int, int>, int>' to 'std::vector<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>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:47: error: expected ')' before ';' token
   11 |     a.push_back(make_pair(make_pair(s,-1*p),i);
      |                ~                              ^
      |                                               )
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: wrong number of template arguments (1, should be 2)
    7 |   vector<pair<pair<string,int>>,int> a;
      |                              ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:7:36: error: template argument 1 is invalid
    7 |   vector<pair<pair<string,int>>,int> a;
      |                                    ^
a.cc:11:7: error: request for member 'push_back' in 'a', which is of non-class type 'int'
   11 |     a.push_back(make_pair(make_pair(s,-1*p),i);
      |       ^~~~~~~~~
a.cc:11:47: error: expected ')' before ';' token
   11 |     a.push_back(make_pair(make_pair(s,-1*p),i);
      |                ~                              ^
      |                                               )
a.cc:13:10: error: request for member 'begin' in 'a', which is of non-class type 'int'
   13 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:13:20: error: request for member 'end' in 'a', which is of non-class type 'int'
   13 |   sort(a.begin(),a.end());
      |                    ^~~
a.cc:15:13: error: request for member 'at' in 'a', which is of non-class type 'int'
   15 |     cout<<a.at(i).second<<endl;
      |             ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:37: error: template argument 1 is invalid
    7 |   vector<pair<pair<string,int>,int> a;
      |                                     ^
a.cc:7:37: error: template argument 2 is invalid
a.cc:11:5: error: 'a' was not declared in this scope
   11 |     a.push_back(make_pair(make_pair(s,-1*p),i);
      |     ^
a.cc:11:47: error: expected ')' before ';' token
   11 |     a.push_back(make_pair(make_pair(s,-1*p),i);
      |                ~                              ^
      |                                               )
a.cc:13:8: error: 'a' was not declared in this scope
   13 |   sort(a.begin(),a.end());
      |        ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:39: error: template argument 1 is invalid
    7 |   vector<pair<pair<string,int>,int> a();
      |                                       ^
a.cc:7:39: error: template argument 2 is invalid
a.cc:11:5: error: 'a' was not declared in this scope
   11 |     a.push_back(make_pair(make_pair(s,-1*p),i);
      |     ^
a.cc:11:47: error: expected ')' before ';' token
   11 |     a.push_back(make_pair(make_pair(s,-1*p),i);
      |                ~                              ^
      |                                               )
a.cc:13:8: error: 'a' was not declared in this scope
   13 |   sort(a.begin(),a.end());
      |        ^
Language: C++

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

int main() {
  int n;
  cin >>n;
  vector< tuple<string, int,int> > v(n);
  
  for(int i=0;i<n;i++){
    int a;
    cin >> get<0>(v.at(i)) >> a ;
    get<1>(v.at(i)) =-a;
    get<2>(v.at(i))= i+1;
  }
  
  sort(v.begin(), v.end());
  
  for(autp &it :v){
    cout << get<2>(it) << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:7: error: 'autp' was not declared in this scope; did you mean 'auto'?
   18 |   for(autp &it :v){
      |       ^~~~
      |       auto
a.cc:18:16: error: found ':' in nested-name-specifier, expected '::'
   18 |   for(autp &it :v){
      |                ^
      |                ::
a.cc:18:13: error: 'it' has not been declared
   18 |   for(autp &it :v){
      |             ^~
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
a.cc:20:4: error: expected ';' before '}' token
   20 |   }
      |    ^
      |    ;
   21 | 
   22 | }
      | ~   
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
a.cc:20:4: error: expected ')' before '}' token
   20 |   }
      |    ^
      |    )
   21 | 
   22 | }
      | ~   
a.cc:18:6: note: to match this '('
   18 |   for(autp &it :v){
      |      ^
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,a,b;
  string s;
  cin>>N;
  vector<tuple<string,int,int>> t;
  for(int i=0;i<N;i++){
    cin>>s>>a;
    t.push_back(make_tuple(s,(-1)*a,i+1));
  }
  sort(t.begin(),t.end());
  for(int i=0,i<N;i++){
    tie(s,a,b)=t[i];
    cout<<b<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before '<' token
   13 |   for(int i=0,i<N;i++){
      |                ^
      |                ;
a.cc:13:16: error: expected primary-expression before '<' token
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,a,b;
  string s;
  cin>>N;
  vector<tuple<string,int,int>> t;
  for(int i=0;i<N;i++){
    cin>>s>>a;
    t.push_back(s,(-1)*a,i+1);
  }
  sort(t.begin(),t.end());
  for(int i=0,i<N;i++){
    tie(s,a,b)=t[i];
    cout<<b<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: no matching function for call to 'std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >::push_back(std::string&, int, int)'
   10 |     t.push_back(s,(-1)*a,i+1);
      |     ~~~~~~~~~~~^~~~~~~~~~~~~~
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:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>; _Alloc = std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >; value_type = std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 3 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>; _Alloc = std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >; value_type = std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 3 provided
a.cc:13:16: error: expected ';' before '<' token
   13 |   for(int i=0,i<N;i++){
      |                ^
      |                ;
a.cc:13:16: error: expected primary-expression before '<' token
Language: C++

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

using vector<tuple<string,int,int>>=vtsii;
        
int main(){
  int i,j;
  int N;cin>>N;
  vtsii rest(N);
  for(i=0;i<N;i++){
    cin>>rest[i].first>>rest[i].second;
    rest[i].second*=-1;
  }
  vtsii sw(N);
  sw=rest;
  sort(sw.begin(),sw.end());
  for(i=0;i<N;i++)get<2>(sw[i])=i+1;
  for(i=0;i<N;i++)for(j=0;j<N;j++){
    if(get<0>(rest[i])==get<0>(sw[j])&&get<1>(rest)[i]==get<1>(sw[j])){
      get<2>(rest[i])=get<2>(sw[j]);
    }
  }
  for(i=0;i<N;i++)cout<<get<2>(rest)<<endl;
  
  
  
  
}


Compiler output:
a.cc:4:34: error: '>>=' should be '>> =' to terminate a template argument list
    4 | using vector<tuple<string,int,int>>=vtsii;
      |                                  ^~~
      |                                  >> =
a.cc:4:37: error: template argument 1 is invalid
    4 | using vector<tuple<string,int,int>>=vtsii;
      |                                     ^~~~~
a.cc:4:37: error: template argument 2 is invalid
a.cc:4:7: error: expected nested-name-specifier
    4 | using vector<tuple<string,int,int>>=vtsii;
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'vtsii' was not declared in this scope
    9 |   vtsii rest(N);
      |   ^~~~~
a.cc:11:10: error: 'rest' was not declared in this scope
   11 |     cin>>rest[i].first>>rest[i].second;
      |          ^~~~
a.cc:14:8: error: expected ';' before 'sw'
   14 |   vtsii sw(N);
      |        ^~~
      |        ;
a.cc:15:3: error: 'sw' was not declared in this scope
   15 |   sw=rest;
      |   ^~
a.cc:15:6: error: 'rest' was not declared in this scope
   15 |   sw=rest;
      |      ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'class std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >' has no member named 'push'
   15 |     a.push.back(tie(s,p,i));
      |       ^~~~
a.cc:19:22: error: 'i' was not declared in this scope
   19 |     cout << get<2>(a[i]) << endl;
      |                      ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected unqualified-id before '=' token
   10 |   for (int = i; i <= n; ++i){
      |            ^
a.cc:10:11: error: expected ';' before '=' token
   10 |   for (int = i; i <= n; ++i){
      |           ^~
      |           ;
a.cc:10:12: error: expected primary-expression before '=' token
   10 |   for (int = i; i <= n; ++i){
      |            ^
a.cc:10:14: error: 'i' was not declared in this scope
   10 |   for (int = i; i <= n; ++i){
      |              ^
a.cc:10:23: error: expected ')' before ';' token
   10 |   for (int = i; i <= n; ++i){
      |       ~               ^
      |                       )
a.cc:10:27: error: 'i' was not declared in this scope
   10 |   for (int = i; i <= n; ++i){
      |                           ^
Language: C++

n = int(input())
x =[]
for i in range(n):
    a,b=input().split()
    b=int(b)
    x.append([i+1,a,b])
    x.sort(key=lambda x:x[2],reverse = True)
    x.sort(key=lambda x:x[1])
for i in range(n):
    print(x[i][0])

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
   int n;
   cin>>n;
  
   vector<tuple<string,int,int>>a;
  
  for(int i=0;i<n;i++)
  {
      string s;
      int p;
      int id = i+1;
    
    cin>>s>>p;
    p=-p;
    a.push_back(tie(s,p,id));
    tie(s,p,id) = a[i];
    
  }
    
  sort(a.begin(),a.end());
  
  for(int i:id)
  {
      cout<<i<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'id' was not declared in this scope; did you mean 'i'?
   26 |   for(int i:id)
      |             ^~
      |             i
Language: C++

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

int main()
{
   int n;
   cin>>n;
  
  vector<tuple<string,int,int>>a;
  
  for(int i=0;i<n;i++)
  {
      string s;
      int p;
      int id = i+1;
    
    cin>>s>>p;
    p=-p;
    a.push_back(tie(s,p,id));
    
  }
    
  sort(a.begin(),a.end());
  
  for(int i:a)
  {
      cout<<id<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: cannot convert 'std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>' to 'int' in initialization
   25 |   for(int i:a)
      |             ^
a.cc:27:13: error: 'id' was not declared in this scope; did you mean 'i'?
   27 |       cout<<id<<endl;
      |             ^~
      |             i
Language: C++

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

int main()
{
   int n;
   cin>>n;
  
   tuple<string,int,int>a[n];
  
  for(int i=0;i<n;i++)
  {
      string s;
      int p;
      int id = i+1;
    
    cin>>s>>p;
    p=-p;
    tie(s,p,id) = a[i];
    
  }
    
  sort(a,a+n);
  
  for(int i=0;i<n;i++)
  {
      cout<<id[i]<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: 'id' was not declared in this scope; did you mean 'i'?
   27 |       cout<<id[i]<<endl;
      |             ^~
      |             i
Language: C++

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

int main()
{
   int n;
   cin>>n;
  
   tuple<string,int,int>a[n];
  
  for(int i=0;i<n;i++)
  {
      string s;
      int p;
      int id = i+1;
    
    cin>>s>>p;
    p=-p;
    tie(s,p,id) = a[i];
    
  }
    
  sort(a,a+n);
  
 
      cout<<id<<endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'id' was not declared in this scope
   26 |       cout<<id<<endl;
      |             ^~
Language: C++

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

int main()
{
   int n;
   cin>>n;
  
   tuple<string,int,int>a[n];
  
  for(int i=0;i<n;i++)
  {
      string s;
      int p;
      int id = i+1;
    
    cin>>s>>p;
    p=-p;
    tie(s,p,id) = a[i];
    
  }
    
  sort(a,a+n);
  
  
      cout<<id)<<endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'id' was not declared in this scope
   26 |       cout<<id)<<endl;
      |             ^~
Language: C++

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

int main()
{
   int n;
   cin>>n;
  
   tuple<string,int,int>a[n];
  
  for(int i=0;i<n;i++)
  {
      string s;
      int p;
      int id = i+1;
    
    cin>>s>>p;
    p=-p;
    tie(s,p,id) = a[i];
    
  }
    
  sort(a,a+n);
  
  for(int i=0;i<n;i++)
  {
      cout<<a[i].id)<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>' has no member named 'id'
   27 |       cout<<a[i].id)<<endl;
      |                  ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
   int n;
  cin>>n;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:6: error: 'class std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >' has no member named 'push'
   21 |    a.push.back(tie(s,p,id));
      |      ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
   int n;
  cin>>n;

  vector<tulpe<string,int,int>>a;
  
  for(int i=0;i<n;i++)
  {
     string s;
    int p;
    int id;
   
    cin>>s>>p;
    id=i+1;
    p=-p;
   
   a.push.back(tie(s,p,id));
  }
  sort(a.begin(),a.end());
  
  for(int i=0;i<n;i++)
  {
      cout<<get<2>(a[i])<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'tulpe' was not declared in this scope; did you mean 'toupper'?
    9 |   vector<tulpe<string,int,int>>a;
      |          ^~~~~
      |          toupper
a.cc:9:27: error: wrong number of template arguments (3, should be at least 1)
    9 |   vector<tulpe<string,int,int>>a;
      |                           ^~~
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:428:11: note: provided for 'template<class _Tp, class _Alloc> class std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
a.cc:9:30: error: expected unqualified-id before '>' token
    9 |   vector<tulpe<string,int,int>>a;
      |                              ^~
a.cc:21:4: error: 'a' was not declared in this scope
   21 |    a.push.back(tie(s,p,id));
      |    ^
a.cc:23:8: error: 'a' was not declared in this scope
   23 |   sort(a.begin(),a.end());
      |        ^
Language: C++

#include <bits/stdc++.h>
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:21:14: error: 'class std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >' has no member named 'push'
   21 |         list.push.back(tie(s,p,i));
      |              ^~~~
Language: C++

#include <bits/stdc++.h>
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[n]=make_tuple(s[i],t[i],i);
        
        a.push.back(tie(s,p,i));
  }
  
   sort(list.begin(),list.end());
  
  for(int i=0;i<n;i++)
  {
      cout<<get<2>(a[i])<<endl;
  
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:33: error: 't' was not declared in this scope
   19 |         list[n]=make_tuple(s[i],t[i],i);
      |                                 ^
a.cc:21:9: error: 'a' was not declared in this scope
   21 |         a.push.back(tie(s,p,i));
      |         ^
a.cc:28:20: error: 'a' was not declared in this scope
   28 |       cout<<get<2>(a[i])<<endl;
      |                    ^
Language: C++

using namespace std;
 
int main()
{
  int n;
  cin>>n;
  
  vector<tuple<string,int,int>> a;
  
  for(int i=1;i<n;i++)
  {
    string s;
    int p;
    
    cin>>s>>p;
    
    p=-p;
    
    a[i]=make_tuple(s,p,i);
    
  }
  
  sort(a.begin(),a.end());
  
  for(int i=1;i<n;i++)
  {
    cout<<get<2>a[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:8:3: error: 'vector' was not declared in this scope
    8 |   vector<tuple<string,int,int>> a;
      |   ^~~~~~
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:8:10: error: 'tuple' was not declared in this scope
    8 |   vector<tuple<string,int,int>> a;
      |          ^~~~~
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:8:16: error: 'string' was not declared in this scope
    8 |   vector<tuple<string,int,int>> a;
      |                ^~~~~~
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:8:23: error: expected primary-expression before 'int'
    8 |   vector<tuple<string,int,int>> a;
      |                       ^~~
a.cc:12:11: error: expected ';' before 's'
   12 |     string s;
      |           ^~
      |           ;
a.cc:15:10: error: 's' was not declared in this scope
   15 |     cin>>s>>p;
      |          ^
a.cc:19:5: error: 'a' was not declared in this scope
   19 |     a[i]=make_tuple(s,p,i);
      |     ^
a.cc:19:10: error: 'make_tuple' was not declared in this scope
   19 |     a[i]=make_tuple(s,p,i);
      |          ^~~~~~~~~~
a.cc:19:10: note: 'std::make_tuple' is defined in header '<tuple>'; this is probably fixable by adding '#include <tuple>'
a.cc:23:8: error: 'a' was not declared in this scope
   23 |   sort(a.begin(),a.end());
      |        ^
a.cc:23:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   23 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout<<get<2>a[i]<<endl;
      |     ^~~~
a.cc:27:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:11: error: 'get' was not declared in this scope
   27 |     cout<<get<2>a[i]<<endl;
      |           ^~~
a.cc:27:23: error: 'endl' was not declared in this scope
   27 |     cout<<get<2>a[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;
Language: C++

#include <bits/stdc++.h>
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[n]=make_tuple(s[i],t[i],i);
        
        a.push.back(tie(s,p,i));
  }
  
   sort(a.begin(),a.end());
  
  for(int i=0;i<n;i++)
  {
      cout<<get<2>(a[i])<<endl;
  
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:33: error: 't' was not declared in this scope
   19 |         list[n]=make_tuple(s[i],t[i],i);
      |                                 ^
a.cc:21:9: error: 'a' was not declared in this scope
   21 |         a.push.back(tie(s,p,i));
      |         ^
a.cc:24:9: error: 'a' was not declared in this scope
   24 |    sort(a.begin(),a.end());
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  char a[120];
  pair<pair<string,int>,int> b[110];
  for(int i=0;i<N;i++){
 int t;
    cin>>a>>t;
    string A=a;
    b[i]=make_pair(make_pair(a,-t),i);
    
  
  }
  std::sort(b,b+a);
  for(int i=0;i<N;i++){
    cout<<b[i].second+1<<endl;
    
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: invalid operands of types 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [110]' and 'char [120]' to binary 'operator+'
   16 |   std::sort(b,b+a);
      |               ~^~
      |               | |
      |               | char [120]
      |               std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [110]
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  char a[120];
  pair<pair<string,int>,int> b[110];
  for(int i=0;i<N;i++){
 int t;
    cin>>a>>t;
    string A=a;
    b[i]=make_pair(make_pair(a,-t),i);
    
  
  }
  sort(b,b+a);
  for(int i=0;i<N;i++){
    cout<<b[i].second+1<<endl;
    
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: invalid operands of types 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [110]' and 'char [120]' to binary 'operator+'
   16 |   sort(b,b+a);
      |          ~^~
      |          | |
      |          | char [120]
      |          std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [110]
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  char a[100];
  pair<pair<string,int>,int> b[110];
  for(int i=0;i<N;i++){
 int t;
    cin>>a>>t;
    string A=a;
    b[i]=make_pair(make_pair(a,-t),i);
    
  
  }
  sort(b,b+a);
  for(int i=0;i<N;i++){
    cout<<b[i].second+1<<endl;
    
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: invalid operands of types 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [110]' and 'char [100]' to binary 'operator+'
   16 |   sort(b,b+a);
      |          ~^~
      |          | |
      |          | char [100]
      |          std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [110]
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  char a[100];
  pair<pair<string,int>,int> b[100];
  for(int i=0;i<N;i++){
 int t;
    cin>>a>>t;
    string A=a;
    b[i]=make_pair(make_pair(a,-t),i);
    
  
  }
  sort(b,b+a);
  for(int i=0;i<N;i++{
    cout<<b[i].second+1<<endl;
    
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: invalid operands of types 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [100]' and 'char [100]' to binary 'operator+'
   16 |   sort(b,b+a);
      |          ~^~
      |          | |
      |          | char [100]
      |          std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [100]
a.cc:17:22: error: expected ')' before '{' token
   17 |   for(int i=0;i<N;i++{
      |      ~               ^
      |                      )
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {
  int n,b;
  cin>>n;
  string a;
  tuple<string, int, int>> score;
  rep(i,n){
    cin>>a>>b;
    score.push_back(make_tuple(a,100-b,i+1));
  }
  sort(score.begin(),score.end());
  
  for(tuple<string, int, int>t :score){
    string d;
    int e,f;
    tie(d,e,f)=t;
    cout<<f<<endl;
  }
    
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected unqualified-id before '>' token
    9 |   tuple<string, int, int>> score;
      |                         ^~
a.cc:12:5: error: 'score' was not declared in this scope
   12 |     score.push_back(make_tuple(a,100-b,i+1));
      |     ^~~~~
a.cc:14:8: error: 'score' was not declared in this scope
   14 |   sort(score.begin(),score.end());
      |        ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {
  int n,b;
  cin>>n;
  string a;
  vector <tuple<string, int, int>> score;
  rep(i,n){
    cin>>a>>b;
    score.push_back(make_tuple(a,b,i));
  }
  sort(score.begin(),score.end());
  
  rep(i,n){
    cout<<score.at(i).at(2)<<endl;
  }
    
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >::value_type' {aka 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>'} has no member named 'at'
   17 |     cout<<score.at(i).at(2)<<endl;
      |                       ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {
  int n,b;
  cin>>n;
  string a;
  vector <tuple<string, int, int>> score;
  rep(i,n){
    cin>>a>>b;
    score.push_back(make_tuple(a,b,i));
  }
  sort(score.begin(),score.end());
  
  rep(i,n){
    cout<<score.at(i).third<<endl;
  }
    
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >::value_type' {aka 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>'} has no member named 'third'
   17 |     cout<<score.at(i).third<<endl;
      |                       ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {
  int n,b;
  cin>>n;
  string a;
  vector <tuple<string, int, int>> score;
  rep(i,n){
    cin>>a>>b;
    score.push_back(make_tuple(a,b,i));
  }
  sort(score.begin(),score.end());
  
  rep(i,n){
    cout<<score.(i).third<<endl;
  }
    
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: expected unqualified-id before '(' token
   17 |     cout<<score.(i).third<<endl;
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {
  int n,b;
  cin>>n;
  string a;
  vector <tuple<string, int, int>> score;
  rep(i,n){
    cin>>a>>b;
    score.push_back(make_tuple(a,b,i));
  }
  sort(score.begin(),score.end());
  
  rep(i,n){
    cout<<a.(i).third<<endl;
  }
    
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: expected unqualified-id before '(' token
   17 |     cout<<a.(i).third<<endl;
      |             ^
Language: C++

#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

struct rest{
  int p,i;
  string s;
  rest(string s,int p,int i):s(s),p(p),i(i){}
};

int main(){
  vector<rest> rests;
  int n; cin >> n;
  for(int i=1;i<=n;i++){
    int s,p; cin >> s >> p;
    rests.emplace_back(s,p,i);
  }
  auto cmp=[&](rest a, rest b){
    if(a.s!=b.s) return a.s < b.s;
    else return a.p > b.p;
  };
  
  sort(rests.begin(),rests.end(),cmp);
  for(auto r:rests) cout << r.i << endl;
}


Compiler output:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33,
                 from /usr/include/c++/14/bits/allocator.h:46,
                 from /usr/include/c++/14/string:43,
                 from a.cc:1:
/usr/include/c++/14/bits/new_allocator.h: In instantiation of 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = rest; _Args = {int&, int&, int&}; _Tp = rest]':
/usr/include/c++/14/bits/alloc_traits.h:575:17:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = rest; _Args = {int&, int&, int&}; _Tp = rest; allocator_type = std::allocator<rest>]'
  575 |           __a.construct(__p, std::forward<_Args>(__args)...);
      |           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:117:30:   required from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int&, int&, int&}; _Tp = rest; _Alloc = std::allocator<rest>; reference = rest&]'
  117 |             _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
      |             ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  118 |                                      std::forward<_Args>(__args)...);
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:18:23:   required from here
   18 |     rests.emplace_back(s,p,i);
      |     ~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/bits/new_allocator.h:191:11: error: no matching function for call to 'rest::rest(int&, int&, int&)'
  191 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:10:3: note: candidate: 'rest::rest(std::string, int, int)'
   10 |   rest(string s,int p,int i):s(s),p(p),i(i){}
      |   ^~~~
a.cc:10:15: note:   no known conversion for argument 1 from 'int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   10 |   rest(string s,int p,int i):s(s),p(p),i(i){}
      |        ~~~~~~~^
a.cc:7:8: note: candidate: 'rest::rest(const rest&)'
    7 | struct rest{
      |        ^~~~
a.cc:7:8: note:   candidate expects 1 argument, 3 provided
a.cc:7:8: note: candidate: 'rest::rest(rest&&)'
a.cc:7:8: note:   candidate expects 1 argument, 3 provided
Language: C++

#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

struct rest{
  int p,i;
  string s;
  rest(string s,int p,int i):s(s),p(p),i(i){}
};

int main(){
  vector<rest> rests;
  int n; cin >> n;
  for(int i=1;i<=n;i++){
    int s,p; cin >> s >> p;
    rests.emplace_back(s,p,i);
  }
  auto cmp=[&](rest a, rest b){
    if(a.s!=b.s) return a.s < b.s;
    else return a.p > b.p;
  }
  sort(rests.begin(),rests.end(),cmp);
  for(auto r:rests) cout << r.i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: expected ',' or ';' before 'sort'
   24 |   sort(rests.begin(),rests.end(),cmp);
      |   ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33,
                 from /usr/include/c++/14/bits/allocator.h:46,
                 from /usr/include/c++/14/string:43,
                 from a.cc:1:
/usr/include/c++/14/bits/new_allocator.h: In instantiation of 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = rest; _Args = {int&, int&, int&}; _Tp = rest]':
/usr/include/c++/14/bits/alloc_traits.h:575:17:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = rest; _Args = {int&, int&, int&}; _Tp = rest; allocator_type = std::allocator<rest>]'
  575 |           __a.construct(__p, std::forward<_Args>(__args)...);
      |           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:117:30:   required from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int&, int&, int&}; _Tp = rest; _Alloc = std::allocator<rest>; reference = rest&]'
  117 |             _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
      |             ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  118 |                                      std::forward<_Args>(__args)...);
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:18:23:   required from here
   18 |     rests.emplace_back(s,p,i);
      |     ~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/bits/new_allocator.h:191:11: error: no matching function for call to 'rest::rest(int&, int&, int&)'
  191 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:10:3: note: candidate: 'rest::rest(std::string, int, int)'
   10 |   rest(string s,int p,int i):s(s),p(p),i(i){}
      |   ^~~~
a.cc:10:15: note:   no known conversion for argument 1 from 'int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   10 |   rest(string s,int p,int i):s(s),p(p),i(i){}
      |        ~~~~~~~^
a.cc:7:8: note: candidate: 'rest::rest(const rest&)'
    7 | struct rest{
      |        ^~~~
a.cc:7:8: note:   candidate expects 1 argument, 3 provided
a.cc:7:8: note: candidate: 'rest::rest(rest&&)'
a.cc:7:8: note:   candidate expects 1 argument, 3 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  pair<pair<string,int>,int>a[110];
  for(int i=0;i<N;i++){
  string S;
    int A;
    cin>>S>>A;
    a[i]=make_pair(make_pair(S,-A),i);
  
  }
  std::sort(a,a+A);
  for(int i=0;i<N;i++){
  
  cout<<a[i].second+1<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'A' was not declared in this scope
   14 |   std::sort(a,a+A);
      |                 ^
Language: C++

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

  char in[120];
pair<pair<string,int>,int> p[110];
int main(){
int a;scanf("%d",&a);
for(int i=0;i<a;i++){
int t;scanf("%s%d",in,&t);
string tmp=in;
p[i]=make_pair(make_pair(in,-t),i);
}
std::sort(p,p+a);
for(int i=0;i<a;i++)printf("%d\n",p[i].second+1);
}
}

Compiler output:
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
map<pair<string,int>,int> R;
  int N;
  cin>>N;
  for(int i=0;i<N;i++){
  string t;
    int s;
    cin>>t>>s;
    pair<string,int>p(t,s);
    R[p]=i+1;
  
  }for(auto p:R){
  auto k=p.first;
    auto v=p.fisrt;
    cout<<v<<endl;
  
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: 'struct std::pair<const std::pair<std::__cxx11::basic_string<char>, int>, int>' has no member named 'fisrt'; did you mean 'first'?
   16 |     auto v=p.fisrt;
      |              ^~~~~
      |              first
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
map<pair<string.int>,int> R;
  int N;
  cin>>N;
  for(int i=0;i<N;i++){
  string t;
    int s;
    cin>>t>>s;
    pair<string,int>p(t,s);
    R[p]=i+1;
  
  }for(auto p:R){
  auto k=p.first;
    auto v=p.fisrt;
    cout<<v<<endl;
  
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:20: error: wrong number of template arguments (1, should be 2)
    4 | map<pair<string.int>,int> R;
      |                    ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:4:25: error: template argument 1 is invalid
    4 | map<pair<string.int>,int> R;
      |                         ^
a.cc:4:25: error: template argument 3 is invalid
a.cc:4:25: error: template argument 4 is invalid
a.cc:12:6: error: no match for 'operator[]' (operand types are 'int' and 'std::pair<std::__cxx11::basic_string<char>, int>')
   12 |     R[p]=i+1;
      |      ^
a.cc:14:15: error: 'begin' was not declared in this scope
   14 |   }for(auto p:R){
      |               ^
a.cc:14:15: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:14:15: error: 'end' was not declared in this scope
   14 |   }for(auto p:R){
      |               ^
a.cc:14:15: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define puts(i) cout<<i<<endl
using ll = long long;
using P = pair<int,int>;

int main(){
	int n;
	cin>>n;
	string s[n];
	int p[n];
	map<string,vector<pair<int,int>>> mp;
	rep(i,n){
		cin>>s[i]>>p[i];
		mp[s[i]].push_back(make_pair(p[i],i));
	}
	
	sort(s,s+n);
	for(auto a:mp){
		sort(a.second.begin(),a.second.end(),[](pair<int,int> x,pair<int,int> y){return x.first<y.first;});
	}
	rep(i,n){
		vector v = mp[s[i]].second;
		for(auto a:v){
			puts(a.second);
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:37: error: 'std::map<std::__cxx11::basic_string<char>, std::vector<std::pair<int, int> > >::mapped_type' {aka 'class std::vector<std::pair<int, int> >'} has no member named 'second'
   24 |                 vector v = mp[s[i]].second;
      |                                     ^~~~~~
Language: C++

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


int main() {
	int n;
	cin>>n;
	vector<tuple<string,int,int>> list(n);
	
	for(int i=0;i<n;i++){
		string s;
		int t;
		
		cin>>s>>t;
		t=-t;
		
		list.push_back(make_tuple(s,t,i+1))
	}
	
	sort(list.begin(),list.end());
	for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
}

//vector,tuple,pairの取り扱いわからん。

Compiler output:
a.cc: In function 'int main()':
a.cc:17:52: error: expected ';' before '}' token
   17 |                 list.push_back(make_tuple(s,t,i+1))
      |                                                    ^
      |                                                    ;
   18 |         }
      |         ~                                           
a.cc:21:46: error: no match for call to '(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >) (int&)'
   21 |         for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
      |                                          ~~~~^~~
Language: C++

#include <iostream>
using namespace std;


int main() {
	int n;
	cin>>n;
	vector<tuple<string,int,int>> list;
	
	for(int i=0;i<n;i++){
		string s;
		int t;
		
		cin>>s>>t;
		t=-t;
		
		list.push_back(make_tuple(s,t,i+1))
	}
	
	sort(list.begin(),list.end());
	for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
}

//vector,tuple,pairの取り扱いわからん。

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<tuple<string,int,int>> list;
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:36: error: expected primary-expression before '>' token
    8 |         vector<tuple<string,int,int>> list;
      |                                    ^~
a.cc:8:39: error: 'list' was not declared in this scope
    8 |         vector<tuple<string,int,int>> list;
      |                                       ^~~~
a.cc:2:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
    1 | #include <iostream>
  +++ |+#include <list>
    2 | using namespace std;
a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |         sort(list.begin(),list.end());
      |         ^~~~
      |         short
Language: C++

#include <iostream>
using namespace std;


int main() {
	int n;
	cin>>n;
	vector<tuple<string,int,int>> list(n);
	
	for(int i=0;i<n;i++){
		string s;
		int t;
		
		cin>>s>>t;
		t=-t;
		
		list.push_back(make_tuple(s,t,i+1))
	}
	
	sort(list.begin(),list.end());
	for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
}

//vector,tuple,pairの取り扱いわからん。

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<tuple<string,int,int>> list(n);
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:36: error: expected primary-expression before '>' token
    8 |         vector<tuple<string,int,int>> list(n);
      |                                    ^~
a.cc:8:39: error: 'list' was not declared in this scope
    8 |         vector<tuple<string,int,int>> list(n);
      |                                       ^~~~
a.cc:2:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
    1 | #include <iostream>
  +++ |+#include <list>
    2 | using namespace std;
a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |         sort(list.begin(),list.end());
      |         ^~~~
      |         short