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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,i=0;
  cin>>n;
  vector< pair< pair<string,int>,int > > v;
  string s;
  int p;
  while(n--)
  {
    i++;
    cin>>s>>p;
    v.push_back({{s,-p},i});
  }
  sort(v.begin(),v.end());
  for(auto q:v) cout<<v.second<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'class std::vector<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >' has no member named 'second'
   17 |   for(auto q:v) cout<<v.second<<endl;
      |                         ^~~~~~
Language: Java

import java.io.*;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.IntStream;

public class Main {
  public static void main(String[] args) {
    new ABC128B2().run();
  }

  private void run() {
    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

        int n = Integer.parseInt(in.readLine());

        String[][] ss = in.lines()
          .limit(n)
          .map(l -> l.split(" "))
          .toArray(String[][]::new);

        Map<String,Integer> map = new HashMap<>();
        IntStream.range(0, n)
          .forEach(i -> map.put(ss[i][0]+ss[i][1], i+1));

        Arrays.parallelSort(ss, (a, b) -> {
          if(!a[0].equals(b[0]))
            return a[0].compareTo(b[0]);
          else
            return - Integer.parseInt(a[1]) + Integer.parseInt(b[1]);
        });

        Arrays.stream(ss).forEach(s -> out.println(map.get(s[0]+s[1])));
        out.flush();
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }
}

Compiler output:
Main.java:10: error: cannot find symbol
    new ABC128B2().run();
        ^
  symbol:   class ABC128B2
  location: class Main
1 error
Language: C++

#include <stdio.h>
#include <string.h>
 
int main(void){
  int N, i, j, P[105], rank[105], tmp1;
  char S[105][15], p[105][3], str[105][15], tmp2[15];
  scanf("%d\n", &N);
  for(i=1; i<=N; i++){
    scanf("%s %d", S[i], &P[i]);
    rank[i]=i;
    P[i]=100-P[i];
    
    
    
    if(P[i]/100==0){
      p[i][0]='0';
    }
    else p[i][0]='1';
    
    
    
    if((P[i]/10)%10==0){
      p[i][1]='0';
    }
    else if((P[i]/10)%10==1){
      p[i][1]='1';
    }
    else if((P[i]/10)%10==2){
      p[i][1]='2';
    }
    else if((P[i]/10)%10==3){
      p[i][1]='3';
    }
    else if((P[i]/10)%10==4){
      p[i][1]='4';
    }
    else if((P[i]/10)%10==5){
      p[i][1]='5';
    }
    else if((P[i]/10)%10==6){
      p[i][1]='6';
    }
    else if((P[i]/10)%10==7){
      p[i][1]='7';
    }
    else if((P[i]/10)%10==8){
      p[i][1]='8';
    }
    else if((P[i]/10)%10==9){
      p[i][1]='9';
    }
    
    
    
    if((P[i]%10==0){
      p[i][2]='0';
    }
    else if(P[i]%10==1){
      p[i][2]='1';
    }
    else if(P[i]%10==2){
      p[i][2]='2';
    }
    else if(P[i]%10==3){
      p[i][2]='3';
    }
    else if(P[i]%10==4){
      p[i][2]='4';
    }
    else if(P[i]%10==5){
      p[i][2]='5';
    }
    else if(P[i]%10==6){
      p[i][2]='6';
    }
    else if(P[i]%10==7){
      p[i][2]='7';
    }
    else if(P[i]%10==8){
      p[i][2]='8';
    }
    else if(P[i]%10==9){
      p[i][2]='9';
    }
  }
  
  for(i=1; i<=N; i++){
    sprintf(str[i], "%s%c%c%c", S[i], p[i][0], p[i][1], p[i][2]);
  }
  
  for (i=1; i<=N; ++i) {
    for (j=i+1; j<=N; ++j) {
      if (strcmp(str[i], str[j]) > 0) {
        tmp1 =  rank[i];
        rank[i] = rank[j];
        rank[j] = tmp1;
        strcpy(tmp2, str[i]);
        strcpy(str[i], str[j]);
        strcpy(str[j], tmp2);
      }
    }
  }
  
  for(i=1; i<=N; i++){
    printf("%d\n", rank[i]);
  }
  return(0);
}
 
 
/*
for (i=1; i<=N; ++i) {
    for (j=i+1; j<=N; ++j) {
      if (str[i] > str[j]) {
        tmp1 =  rank[i];
        rank[i] = rank[j];
        rank[j] = tmp1;
        strcpy(tmp2, str[i]);
        strcpy(str[i], str[j]);
        strcpy(str[j], tmp2);
      }
    }
  }
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:55:20: error: expected ')' before '{' token
   55 |     if((P[i]%10==0){
      |       ~            ^
      |                    )
a.cc:85:3: error: expected primary-expression before '}' token
   85 |   }
      |   ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
 
struct shop {
  string name;
  int point;
  int index;
};
 
int main() {
  int N;
  cin >> N;
  vector<shop> vec(N);
  for(int i=0; i<N; i++){
    cin >> vec[i].name >> vec[i].point;
    vec[i].index = i + 1;
  }
  for(int i=0; i<N-1; i++){
    for(int j=0; j<N-1-i; j++){
      for(int k=0; k<vec[j].name.length(); k++){
        if(vec[j].name[k] == vec[j+1].name[k] && vec[j].name.length() == vec[j+1].name.length){
          if(k == vec[j].name.length()-1 && vec[j].point < vec[j+1].point){
            shop temp = vec[j];
            vec[j] = vec[j+1];
            vec[j+1] = temp;
            break;
          }else{
          	continue;
          }
        }else if(vec[j].name[k] > vec[j+1].name[k]){
          shop temp = vec[j];
          vec[j] = vec[j+1];
          vec[j+1] = temp;
          break;
        }else{
          break;
        }
      }
    }
  }
  for(int i=0; i<N; i++){
    cout << vec[i].index << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:88: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   22 |         if(vec[j].name[k] == vec[j+1].name[k] && vec[j].name.length() == vec[j+1].name.length){
      |                                                                                              ()
Language: C++

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

struct shop {
  string name;
  int point;
};

int main() {
  int N;
  cin >> N;
  vector<shop> vec(N);
  for(int i=0; i<N; i++){
    cin >> vec[i].name >> vec[i].point;
  }
  for(int i=0; i<N-1; i++){
    for(int j=0; j<N-1-i; j++){
      for(int k=0; k<vec[j].name.length(); k++){
        if(vec[j].name[k] < vec[j+1].name[k]){
          char temp = vec[j];
          vec[j] = vec[j+1];
          vec[j+1] = temp;
          break;
        }
      }
    }
  }
  for(int i=0; i<N; i++){
    cout << vec[i].name << " " <<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:28: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<shop>, shop>::value_type' {aka 'shop'} to 'char' in initialization
   21 |           char temp = vec[j];
      |                            ^
a.cc:23:22: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<shop>, shop>::value_type' {aka 'shop'} and 'char')
   23 |           vec[j+1] = temp;
      |                      ^~~~
a.cc:5:8: note: candidate: 'shop& shop::operator=(const shop&)'
    5 | struct shop {
      |        ^~~~
a.cc:5:8: note:   no known conversion for argument 1 from 'char' to 'const shop&'
a.cc:5:8: note: candidate: 'shop& shop::operator=(shop&&)'
a.cc:5:8: note:   no known conversion for argument 1 from 'char' to 'shop&&'
Language: C++


#include <queue>
#include <iostream>
#include <sstream>
#include <cstring>

using namespace std;

typedef struct {
    string name;
    int p;
    int idx;
} info;

vector<info> list;

bool operator<(const info& left, const info& right)
{
    if( left.name == right.name ){
        return left.p > right.p;
    }
    return left.name < right.name;
}

int main(void) {

    int n;
    cin >> n;

    int i = 1;
    while(n-->0){
        string s;
        int p;
        cin >> s >> p;
        info _info = { s, p, i++ };
        list.push_back(_info);
    }

    sort(list.begin(), list.end());
    for( vector<info>::iterator it = list.begin(); it != list.end(); it++ ){
        //cout << it->idx << " " << it->name << " " << it->p <<endl;
        cout << it->idx <<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   39 |     sort(list.begin(), list.end());
      |     ^~~~
      |     short
Language: Java

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = Integer.parseInt(sc.next());

        List<Restaurant> list = new ArrayList<>();

        for (int i = 0; i < n; i++) {
            list.add(new Restaurant(sc.next(), Integer.parseInt(sc.next())));
        }

        List<Restaurant> listInOrder = list.stream()
                                           .sorted(Comparator.comparing(Restaurant::getCity).reversed()
                                                             .thenComparing(Restaurant::getPoint).reversed())
                                           .collect(Collectors.toList());

        for (int i = 0; i < list.size(); i++) {
            for (int j = 0; j < list.size(); j++) {
                if (listInOrder.get(i).equals(list.get(j))) {
                    System.out.println(j + 1);
                    break;
                }
            }
        }
    }
}

public class Restaurant {
    private String city;
    private int point;

    public Restaurant(String city, int point) {
        this.city = city;
        this.point = point;
    }

    public String getCity() {
        return this.city;
    }

    public int getPoint() {
        return this.point;
    }

}


Compiler output:
Main.java:36: error: class Restaurant is public, should be declared in a file named Restaurant.java
public class Restaurant {
       ^
1 error
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<pair<string,int>> prvec;
  map<int,int> mp;
  stirng s;
  int a;
  for(int i = 0;i<n;i++){
    cin >> s >> a;
    prvec.push_back(make_pair(s,-a));
    mp[-a] = i+1;
  }
  sort(prvec.begin(),prvec.end());
  for(int i = 0;i<n;i++){
    cout << mp[prvec[i].second] << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'stirng' was not declared in this scope
   12 |   stirng s;
      |   ^~~~~~
a.cc:15:12: error: 's' was not declared in this scope
   15 |     cin >> s >> a;
      |            ^
Language: C++

#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<pair<string,int>> prvec;
  map<int,int> mp;
  stirng s;
  int a;
  for(int i = 0;i<n;i++){
    cin >> s >> a;
    prvec.push_back(make_pair(s,-a));
    mp[-a] = i+1;
  }
  sort(prvec.begin(),prvec.end());
  for(int i = 0;i<n;i++){
    cout << mp[prvec.second] << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'map' was not declared in this scope
   10 |   map<int,int> mp;
      |   ^~~
a.cc:5:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    4 | #include <vector>
  +++ |+#include <map>
    5 | using namespace std;
a.cc:10:7: error: expected primary-expression before 'int'
   10 |   map<int,int> mp;
      |       ^~~
a.cc:11:3: error: 'stirng' was not declared in this scope
   11 |   stirng s;
      |   ^~~~~~
a.cc:14:12: error: 's' was not declared in this scope
   14 |     cin >> s >> a;
      |            ^
a.cc:16:5: error: 'mp' was not declared in this scope
   16 |     mp[-a] = i+1;
      |     ^~
a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |   sort(prvec.begin(),prvec.end());
      |   ^~~~
      |   short
a.cc:20:13: error: 'mp' was not declared in this scope
   20 |     cout << mp[prvec.second] << endl;
      |             ^~
a.cc:20:22: error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int> >' has no member named 'second'
   20 |     cout << mp[prvec.second] << endl;
      |                      ^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <utility>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<pair<string,int>> prvec;
  map<int,int> mp;
  stirng s;
  int a;
  for(int i = 0;i<n;i++){
    cin >> s >> a;
    prvec.push_back(make_pair(s,-a));
    mp[-a] = i+1;
  }
  sort(prvec.begin(),prvec.end());
  for(int i = 0;i<n;i++){
    cout << mp[prvec.second] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<pair<string,int>> prvec;
      |   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <utility>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:8:25: error: expected primary-expression before '>' token
    8 |   vector<pair<string,int>> prvec;
      |                         ^~
a.cc:8:28: error: 'prvec' was not declared in this scope
    8 |   vector<pair<string,int>> prvec;
      |                            ^~~~~
a.cc:9:3: error: 'map' was not declared in this scope
    9 |   map<int,int> mp;
      |   ^~~
a.cc:4:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    3 | #include <utility>
  +++ |+#include <map>
    4 | using namespace std;
a.cc:9:7: error: expected primary-expression before 'int'
    9 |   map<int,int> mp;
      |       ^~~
a.cc:10:3: error: 'stirng' was not declared in this scope
   10 |   stirng s;
      |   ^~~~~~
a.cc:13:12: error: 's' was not declared in this scope
   13 |     cin >> s >> a;
      |            ^
a.cc:15:5: error: 'mp' was not declared in this scope
   15 |     mp[-a] = i+1;
      |     ^~
a.cc:17:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |   sort(prvec.begin(),prvec.end());
      |   ^~~~
      |   short
a.cc:19:13: error: 'mp' was not declared in this scope
   19 |     cout << mp[prvec.second] << endl;
      |             ^~
Language: C++

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

int main(){
  int N;
  cin>>N;
  
  vector<int>S(N);
  vector<int>P(N);
  
  for(int i=0;i<N;i++){
    cin>>S.at(i)>>P.at(i);
  }
  
  vector<pair<string,int>> T(N);
  vector<pair<string,int>> U(N);
  
  for(int i=0;i<N;i++){
    T.at(i)=make_pair(S.at(i),-P.at(i));
      U.at(i)=T.at(i);
  }
  
  sort(T.begin(),T.end());
  
 )
   for(int i=0;i<N;i++){
     for(int j=0;j<N;j++){
if(T.at(i)==U.at(i)){
  cout<<j+1<<endl;
}
     }
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected primary-expression before ')' token
   25 |  )
      |  ^
a.cc:26:16: error: 'i' was not declared in this scope
   26 |    for(int i=0;i<N;i++){
      |                ^
Language: C++

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

int main(){
  int N;
  cin>>N;
  
  vector<int>S(N);
  vector<int>P(N);
  
  for(int i=0;i<N;i++){
    cin>>S.at(i)>>P.at(i);
  }
  
  vector<pair<string,int>> T(N);
  vector<pair<string,int>> U(N);
  
  for(int i=0;i<N;i++){
    T.at(i)=make_pair(S.at(i),-P.at(i));
      U.at(i)=T.at(i);
  }
  
  sort(T.begin(),T.end());
  
 )
   for(int i=0;i,N;i++){
     for(int j=0;j<N;j++){
if(T.at(i)==U.at(i)){
  cout<<j+1<<endl;
}
     }
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected primary-expression before ')' token
   25 |  )
      |  ^
a.cc:26:16: error: 'i' was not declared in this scope
   26 |    for(int i=0;i,N;i++){
      |                ^
Language: C++

#include<iostream>
#include<vector>
#include<tuple>
using namespace std;
int main(void){
    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.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:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(void){
    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.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:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
Language: C++

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

int main(void){
    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.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:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
Language: C++

#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define FOR(i, a, b) for(int i = a; i < (int)b; ++i)

typedef long long ll;

const int Inf = 100100100;
const double EPS = 1e-9;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<tuple<string, int, int>> a;
    int n;
    cin >> n;
    int i;
    FOR(i, 1, n + 1) {
      string s;
      int p, id;
      cin >> s >> p;
      p = -p;
      a.emplace_back(s, p, i);
    }
    sort(a.begin(), a.end());

    rep(i, n) {
      cout << get<2>(a[i])) << '\n';
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:83:27: error: expected ';' before ')' token
   83 |       cout << get<2>(a[i])) << '\n';
      |                           ^
      |                           ;
Language: C++

#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define FOR(i, a, b) for(int i = a; i < (int)b; ++i)

typedef long long ll;

const int Inf = 100100100;
const double EPS = 1e-9;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<tuple<string, int, int>> a;
    int n;
    cin >> n;
    int i;
    FOR(i, 1, n + 1) {
      string s;
      int p, id;
      cin >> s >> p;
      p = -p;
      a.emplace_back(s, p, i);
    }
    sort(a.begin(), a.end());

    rep(i, n) {
      cout << get<2>(a(i)) << '\n';
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:83:23: 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&)'
   83 |       cout << get<2>(a(i)) << '\n';
      |                      ~^~~
Language: C++

#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define FOR(i, a, b) for(int i = a; i < (int)b; ++i)

typedef long long ll;

const int Inf = 100100100;
const double EPS = 1e-9;

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

    rep(i, n) {
      cout << get<2>(a(i)) << '\n';
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:83:23: 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&)'
   83 |       cout << get<2>(a(i)) << '\n';
      |                      ~^~~
Language: C++

#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define FOR(i, a, b) for(int i = a; i < (int)b; ++i)

typedef long long ll;

const int Inf = 100100100;
const double EPS = 1e-9;

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

    rep(i, n) {
      cout << get<2>(a.at(i)) << '\n';
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:78:31: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   78 |       a.push_back(tie(s, p, 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 a.cc:2:
/usr/include/c++/14/tuple:2791:19: note:   initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {__cxx11::basic_string<char, char_traits<char>, allocator<char> >, int, int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
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;
    cin >> p;
    p = -p
    a.push_back(tie(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:14:11: error: expected ';' before 'a'
   14 |     p = -p
      |           ^
      |           ;
   15 |     a.push_back(tie(s, p, i));
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;cin>>n;
  vector<string> s(n);
  vector<int> a(n);
  for(int i=0;i<n;++i)cin>>s[i]>>a[i];
  vector<int> ord(n);
  sort(ord.begin(),ord.end(),[&](int x,inty){
    if(s[x]==s[y])return a[x]>a[y];
    return s[x]<s[y];
  });
  for(auto e:ord)cout<<e+1<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:40: error: 'inty' has not been declared
    9 |   sort(ord.begin(),ord.end(),[&](int x,inty){
      |                                        ^~~~
a.cc: In lambda function:
a.cc:10:16: error: 'y' was not declared in this scope
   10 |     if(s[x]==s[y])return a[x]>a[y];
      |                ^
a.cc:11:19: error: 'y' was not declared in this scope
   11 |     return s[x]<s[y];
      |                   ^
Language: C++

#include<vector>
#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
#include<limits.h>
#include<tuple>
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;
    cin >> s >> p;
    a.push_back(tie(s,-p,i+1));
  }
  
  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:19:23: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   19 |     a.push_back(tie(s,-p,i+1));
      |                       ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/vector:87,
                 from a.cc:1:
/usr/include/c++/14/tuple:2791:19: note:   initializing argument 2 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {__cxx11::basic_string<char, char_traits<char>, allocator<char> >, int, int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin>>N;
  
  vector<int> S(N);
  vector<int> P(N);
  
  for(int i=0;i<N;i++){
    cin>>S.at(i)>>P.at(i);
  }

  vector<pair<int,int>>T(N);
  
  for(int i=0;i<N;i++){
    T(i)=(S.at(i),P.at(i))
  }
  
  vector<pair<int,int>> U(N)=sort(T.begin(),T.end()))
    
    for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
        if(T.at(i)==U.at(j)){
          cout<<j+1<<endl;
        }
      }
    }
}

    


Compiler output:
a.cc: In function 'int main()':
a.cc:18:6: error: no match for call to '(std::vector<std::pair<int, int> >) (int&)'
   18 |     T(i)=(S.at(i),P.at(i))
      |     ~^~~
a.cc:18:15: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   18 |     T(i)=(S.at(i),P.at(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:1180:7: note: declared here
 1180 |       at(size_type __n)
      |       ^~
a.cc:21:29: error: expected ',' or ';' before '=' token
   21 |   vector<pair<int,int>> U(N)=sort(T.begin(),T.end()))
      |                             ^
a.cc:23:17: error: 'i' was not declared in this scope
   23 |     for(int i=0;i<N;i++){
      |                 ^
Language: C++

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

int main(){
	int n;
	cin>>n;
	
	vector<tuple<string,int,int> > v(n);
	REP(i,n){
		string s;
		int p;
		cin>>s>>p;
		v[i]=make_tuple(s,-1*p,i+1);
	}
	
	sort(ALL(v));
	
	REP(i,n){
		cout<<get<2>(v[i])<<endl;
	}
}//復習.解説参考.

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

#include<iostream>
using namespace std;

pair <pair<stirng, int>, int> p[110];
char in[120];

int main(){
    int a; cin >> a;
    for(int i = 0; i < a; i++){
       int t; cin >> s >> t;
       string tmp = in;
       p[i] = make_pair(make_pair(in,-t),i);
    }
    
    sort(p, p+a);
    for(int i= 0; i < a; i++) cout << p[i].second + 1 << endl;
}

Compiler output:
a.cc:4:12: error: 'stirng' was not declared in this scope
    4 | pair <pair<stirng, int>, int> p[110];
      |            ^~~~~~
a.cc:4:23: error: template argument 1 is invalid
    4 | pair <pair<stirng, int>, int> p[110];
      |                       ^
a.cc:4:29: error: template argument 1 is invalid
    4 | pair <pair<stirng, int>, int> p[110];
      |                             ^
a.cc: In function 'int main()':
a.cc:10:22: error: 's' was not declared in this scope
   10 |        int t; cin >> s >> t;
      |                      ^
a.cc:12:24: error: cannot convert 'std::pair<std::pair<char*, int>, int>' to 'int' in assignment
   12 |        p[i] = make_pair(make_pair(in,-t),i);
      |               ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      |                        |
      |                        std::pair<std::pair<char*, int>, int>
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |     sort(p, p+a);
      |     ^~~~
      |     short
a.cc:16:44: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
   16 |     for(int i= 0; i < a; i++) cout << p[i].second + 1 << endl;
      |                                            ^~~~~~
Language: C++

#include<bits/stdc++.h>
#include<string>
#include<tuple>
using namespace std;
/*
2019/05/26
*/
int main(){
  int n;
  cin>>n;
  vector<tuple<string,int,int>> a;//what tuple?
  for(int i=1;i<=n;i++){
    string s;
    int p;
    cin>>s>>p;
    p=-p;//点数が高いほど小さくなる（上に）
    a.emplace_back(tie(s,p,i));//tie...?
  }
  //sort*tupleのソート
  sort(a.begin(),a.end());
  for(int i=0;i<n;-1i++){
    cout<<get<2>(a[i])<<endl;
    /*
    string s;
    int p;
    int id;
    tie(s,p,i)=a[i];
    cout<<id<<endl;
    */
  }
  //実装するなら――構造体を用意して比較関数を使う
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   21 |   for(int i=0;i<n;-1i++){
      |                    ~~^~
Language: C++

#include<bits/stdc++.h>
#include<string>
#include<tuple>
using namespace std;
/*
2019/05/26
*/
int main(){
  int n;
  cin>>n;
  vector<tuple<string,int,int>> a;//what tuple?
  for(int i=1;i<n=;i++){
    string s;
    int p;
    cin>>s>>p;
    p=-p;//点数が高いほど小さくなる（上に）
    a.emplace_back(tie(s,p,i));//tie...?
  }
  //sort*tupleのソート
  sort(a.begin(),a.end());
  for(int i=0;i<n;i++){
    cout<<get<2>(a[i])<<endl;
    /*
    string s;
    int p;
    int id;
    tie(s,p,i)=a[i];
    cout<<id<<endl;
    */
  }
  //実装するなら――構造体を用意して比較関数を使う
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: expected primary-expression before ';' token
   12 |   for(int i=1;i<n=;i++){
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define For(i,n) for(long i=0;i<(n);i++)
long gcd(long a,long b){
    return b?gcd(b,a%b):a;
}
long n,m,ans=0;
int main(){
    cin>>n;
    vector<string> ato(n);
    vector<string> mae(n);
    For(i,n){
      string s;
      int t;
      cin>>s>>t;
      mae.at(i)=s+itos(9999-t);
      ato.at(i)=s+itos(9999-t);
      
    }
  sort(ato.begin(),ato.end());
  For(i,n){
    For(j,n){
      if(mae.at(j)==ato.at(i)){
        cout<<j<<endl;
        break;
      }
    }
  }
  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: 'itos' was not declared in this scope
   16 |       mae.at(i)=s+itos(9999-t);
      |                   ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
#include <tuple>

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;
        a.push_back(tie(s,p,i));
    }
    sort(a.begin(), a.end());
    reverse(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:22:31: error: expected ')' before ';' token
   22 |     reverse(a.begin(), a.end();
      |            ~                  ^
      |                               )
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
#include <tuple>

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;
        a.push_back(tie(s,p,i));
    }
    sort(a.begin(), a.end());
    reverse(a.beginU(), 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:22:15: error: 'class std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >' has no member named 'beginU'; did you mean 'begin'?
   22 |     reverse(a.beginU(), a.end();
      |               ^~~~~~
      |               begin
a.cc:22:32: error: expected ')' before ';' token
   22 |     reverse(a.beginU(), a.end();
      |            ~                   ^
      |                                )
Language: C++

#include<stdio.h>
#include<string.h>
#include<iostream>
using namespace std;

int main()
{
  int i,j,N;
  int m=0;
  cin >> N;
  char moji[N][30], tmp[30];
  int num[N];
  for(i=0;i<N;i++){
    scanf("%s",&moji[i]);
    scanf("%d",&num[i]);
  }
  for(i=1;i<N;i++){
    for(j=1;j<N;j++){
      if(strcmp(&moji[j-1],&moji[j])>0){
        strcpy(&tmp,&moji[j-1]);
        for(int h=1;h<N;h++){
          strcpy(&moji[h-1],&moji[h]);
        }
        strcpy(&moji[N-1],&tmp);
      }
      if(strcmp(&moji[j-1],&moji[j])==0){
        if(&num[j-1]<&num[j]){
          m=num[j-1];
          num[j-1]=num[j];
          num[j]=m;
        }
      }
    }
    for(i=0;i<N;i++){
      printf("%s%d\n",&moji[i],&num[i]);
    }
  }
          
      


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: cannot convert 'char (*)[30]' to 'const char*'
   19 |       if(strcmp(&moji[j-1],&moji[j])>0){
      |                 ^~~~~~~~~~
      |                 |
      |                 char (*)[30]
In file included from a.cc:2:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:20:16: error: cannot convert 'char (*)[30]' to 'char*'
   20 |         strcpy(&tmp,&moji[j-1]);
      |                ^~~~
      |                |
      |                char (*)[30]
/usr/include/string.h:141:39: note:   initializing argument 1 of 'char* strcpy(char*, const char*)'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
a.cc:22:18: error: cannot convert 'char (*)[30]' to 'char*'
   22 |           strcpy(&moji[h-1],&moji[h]);
      |                  ^~~~~~~~~~
      |                  |
      |                  char (*)[30]
/usr/include/string.h:141:39: note:   initializing argument 1 of 'char* strcpy(char*, const char*)'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
a.cc:24:16: error: cannot convert 'char (*)[30]' to 'char*'
   24 |         strcpy(&moji[N-1],&tmp);
      |                ^~~~~~~~~~
      |                |
      |                char (*)[30]
/usr/include/string.h:141:39: note:   initializing argument 1 of 'char* strcpy(char*, const char*)'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
a.cc:26:17: error: cannot convert 'char (*)[30]' to 'const char*'
   26 |       if(strcmp(&moji[j-1],&moji[j])==0){
      |                 ^~~~~~~~~~
      |                 |
      |                 char (*)[30]
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:37:4: error: expected '}' at end of input
   37 |   }
      |    ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

#include <algorithm>
#include <cstdio>
#include <cstring>
#include <numeric>
const int MAXN = 105;
const int MAXS = 20;
int index[MAXN];
int P[MAXN];
char S[MAXN][MAXS];
int N;

int main() {
    scanf("%d", &N);
    for (int i = 0; i < N; ++i) {
        scanf(" %s%d", S[i], &P[i]);
    }
    std::iota(index, index+N, 0);
    std::sort(index, index+N, [&](int l, int r) {
        int scp = strcmp(S[l], S[r]);
        if (scp != 0) {
            return scp < 0;
        }
        return P[l] > P[r];
    });
    for (int i = 0; i < N; ++i) {
        printf("%d\n", index[i] + 1);
    }
    return 0;
}


Compiler output:
a.cc:7:15: error: 'int index [105]' redeclared as different kind of entity
    7 | int index[MAXN];
      |               ^
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from a.cc:3:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'int main()':
a.cc:17:27: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   17 |     std::iota(index, index+N, 0);
      |                      ~~~~~^~
a.cc:18:27: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   18 |     std::sort(index, index+N, [&](int l, int r) {
      |                      ~~~~~^~
a.cc:26:29: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   26 |         printf("%d\n", index[i] + 1);
      |                             ^
Language: C++

#include<iostream>
#include<tuple>
#include<vector>
#include<algorithm>

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.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:23:4: error: expected '}' at end of input
   23 |   }
      |    ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<tuple>

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.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:8:3: error: 'vector' was not declared in this scope
    8 |   vector<tuple<string,int,int>> a;
      |   ^~~~~~
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 | #include<tuple>
a.cc:8:30: error: expected primary-expression before '>' token
    8 |   vector<tuple<string,int,int>> a;
      |                              ^~
a.cc:8:33: error: 'a' was not declared in this scope
    8 |   vector<tuple<string,int,int>> a;
      |                                 ^
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |     sort(a.begin(),a.end()); //文字列について辞書式に、被った時は満足度についてソート
      |     ^~~~
      |     short
a.cc:21:4: error: expected '}' at end of input
   21 |   }
      |    ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#pragma region include
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <cstdio>
#include <tuple>
#define ALL(obj) (obj).begin(),(obj).end()
#define RALL(obj) (obj).rbegin(),(obj).rend()
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define MOD 1000000007
#define INF 1000000000
#define LLINF 4000000000000000000
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#pragma endregion

#include "debug.h"

int main() {
    cin.tie(0); ios::sync_with_stdio(false);
    int N; cin >> N;
    vector<tuple<string, int, int>> A(N);
    REP(i, N) {
        string s;
        int rank;
        cin >> s >> rank;
        A[i] = make_tuple(s, -rank, i+1);
    }
    sort(ALL(A));
    dump(N);
    REP(i, N) {
        // int id;
        // tie(ignore, ignore, id) = A[i];
        // cout << id << endl;
        cout << get<2>(A[i]) << endl;
    }
    getchar(); getchar();
}

Compiler output:
a.cc:28:10: fatal error: debug.h: No such file or directory
   28 | #include "debug.h"
      |          ^~~~~~~~~
compilation terminated.
Language: C++

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:2:1: error: 'pair' does not name a type
    2 | pair<pair<string,int>,int> p[110];
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:7: error: 'scanf' was not declared in this scope
    4 | int a;scanf("%d",&a);
      |       ^~~~~
a.cc:7:1: error: 'string' was not declared in this scope
    7 | string tmp=in;
      | ^~~~~~
a.cc:8:1: error: 'p' was not declared in this scope
    8 | p[i]=make_pair(make_pair(in,-t),i);
      | ^
a.cc:8:16: error: 'make_pair' was not declared in this scope
    8 | p[i]=make_pair(make_pair(in,-t),i);
      |                ^~~~~~~~~
a.cc:8:6: error: 'make_pair' was not declared in this scope
    8 | p[i]=make_pair(make_pair(in,-t),i);
      |      ^~~~~~~~~
a.cc:10:6: error: 'sort' is not a member of 'std'
   10 | std::sort(p,p+a);
      |      ^~~~
a.cc:10:11: error: 'p' was not declared in this scope
   10 | std::sort(p,p+a);
      |           ^
a.cc:11:21: error: 'printf' was not declared in this scope
   11 | for(int i=0;i<a;i++)printf("%d\n",p[i].second+1);
      |                     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | char in[120];
Language: C++

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

//typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<PII> VP;


//REPEAT
//------------------------------------------
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define RFOR(i, m, n) for(int i = m;i > n;i--)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,m)  RFOR(i,m,0)

//container util
//------------------------------------------
#define pb(a) push_back(a)
#define fst first
#define snd second
#define SORT(V) sort((V).begin(),(V).end())
#define REV(V) reverse((V).begin(),(V).end())

//constant
//------------------------------------------
const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

//grobal variable
//------------------------------------------

//def function, class
//------------------------------------------

//main
//------------------------------------------
signed main(){
  int N;
  cin >> N;
  vector<tuple<string, int , int>> a;　//tupleはpairの拡張版，順に都市名，点数，店番号
  REP(i, N){
    string S;
    int P;
    cin >> S >> P;
    P*=-1;//sortは小さい順なので反転させる
    a.pb(tie(S, P, i));　//tieでまとめてからpush_buck
  }

  SORT(a); //0番目->1番目->...とsortしてくれる
  REP(i, N) cout << get<2>(a.at(i))+1 << endl;

  return 0;
}


Compiler output:
a.cc:50:38: error: extended character 　 is not valid in an identifier
   50 |   vector<tuple<string, int , int>> a;　//tupleはpairの拡張版，順に都市名，点数，店番号
      |                                      ^
a.cc:56:24: error: extended character 　 is not valid in an identifier
   56 |     a.pb(tie(S, P, i));　//tieでまとめてからpush_buck
      |                        ^
a.cc: In function 'int main()':
a.cc:50:38: error: '\U00003000' was not declared in this scope
   50 |   vector<tuple<string, int , int>> a;　//tupleはpairの拡張版，順に都市名，点数，店番号
      |                                      ^~
a.cc:51:7: error: 'i' was not declared in this scope
   51 |   REP(i, N){
      |       ^
a.cc:17:36: note: in definition of macro 'FOR'
   17 | #define FOR(i, m, n) for(int i = m;i < n;i++)
      |                                    ^
a.cc:51:3: note: in expansion of macro 'REP'
   51 |   REP(i, N){
      |   ^~~
Language: C++

#include<bits/stdc++.h>
#include<string>
using namespace std;
/*
2019/05/26
*/
int main(){//解説のやつ
  int n;
  cin>>n;
  vector<tuple<string,int,int>> a;//what tuple?
  for(int i=1;i<n=;i++){
    string s;
    int p;
    cin>>s>>p;
    p=-p;//点数が高いほど小さくなる（上に）
    a.pushu_back(tie(s,p,i));//tie...?
  }
  //sort*tupleのソート
  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:11:19: error: expected primary-expression before ';' token
   11 |   for(int i=1;i<n=;i++){
      |                   ^
a.cc:16: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 'pushu_back'; did you mean 'push_back'?
   16 |     a.pushu_back(tie(s,p,i));//tie...?
      |       ^~~~~~~~~~
      |       push_back