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

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

int main() {
  int N;
  cin >> N;
  vector< tie < string, int , int >> p(N);
  for (int i = 0; i < N; i++) {
    string a ;
    int b ;
    cin >> a >> b;
    p.at(i) = make_tie(a, b , i);  // b, a の順でペアにする
  }

  sort(p.begin(), p.end());

  for (int i = 0; i < N; i++) {
    string  a ; 
    int b;
    int c ;
    tie(a, b , c ) = p.at(i);  // b, a の順であることに注意
    cout << c << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
    7 |   vector< tie < string, int , int >> p(N);
      |                                   ^~
a.cc:7:35: note:   expected a type, got 'tie<std::string, int, int>'
a.cc:7:35: error: template argument 2 is invalid
a.cc:12:7: error: request for member 'at' in 'p', which is of non-class type 'int'
   12 |     p.at(i) = make_tie(a, b , i);  // b, a の順でペアにする
      |       ^~
a.cc:12:15: error: 'make_tie' was not declared in this scope
   12 |     p.at(i) = make_tie(a, b , i);  // b, a の順でペアにする
      |               ^~~~~~~~
a.cc:15:10: error: request for member 'begin' in 'p', which is of non-class type 'int'
   15 |   sort(p.begin(), p.end());
      |          ^~~~~
a.cc:15:21: error: request for member 'end' in 'p', which is of non-class type 'int'
   15 |   sort(p.begin(), p.end());
      |                     ^~~
a.cc:21:24: error: request for member 'at' in 'p', which is of non-class type 'int'
   21 |     tie(a, b , c ) = p.at(i);  // b, a の順であることに注意
      |                        ^~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<pair< string, int , int >> p(N);
  for (int i = 0; i < N; i++) {
    string a ;
    int b ;
    cin >> a >> b;
    p.at(i) = make_pair(a, b , i);  // b, a の順でペアにする
  }

  sort(p.begin(), p.end());

  for (int i = 0; i < N; i++) {
    string  a ; 
    int b;
    int c ;
    tie(a, b , c ) = p.at(i);  // b, a の順であることに注意
    cout << c << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: wrong number of template arguments (3, should be 2)
    7 |   vector<pair< string, int , int >> p(N);
      |                              ^~~
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:34: error: template argument 1 is invalid
    7 |   vector<pair< string, int , int >> p(N);
      |                                  ^~
a.cc:7:34: error: template argument 2 is invalid
a.cc:12:7: error: request for member 'at' in 'p', which is of non-class type 'int'
   12 |     p.at(i) = make_pair(a, b , i);  // b, a の順でペアにする
      |       ^~
a.cc:12:24: error: no matching function for call to 'make_pair(std::string&, int&, int&)'
   12 |     p.at(i) = make_pair(a, b , i);  // b, a の順でペアにする
      |               ~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1132:5: note: candidate: 'template<class _T1, class _T2> constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&)'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1132:5: note:   candidate expects 2 arguments, 3 provided
a.cc:15:10: error: request for member 'begin' in 'p', which is of non-class type 'int'
   15 |   sort(p.begin(), p.end());
      |          ^~~~~
a.cc:15:21: error: request for member 'end' in 'p', which is of non-class type 'int'
   15 |   sort(p.begin(), p.end());
      |                     ^~~
a.cc:21:24: error: request for member 'at' in 'p', which is of non-class type 'int'
   21 |     tie(a, b , c ) = p.at(i);  // b, a の順であることに注意
      |                        ^~
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;cin>>N;
	vector<tuple<string,int,int>> vec(N);
    rep(i,N){
      string st="";cin>>st;
      int a=0;cin>>a;
      tuple<string,int,int> tup(st,-a,i+1);
      vec.push_back(tup);
    }
   
   sort(vec.begin(),vec.end());
   
   rep(i,N){
     int ans;
     tie(ignore,ignore,ans)=(vec[i])
     cout << ans << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:20:37: error: expected ';' before 'cout'
   20 |      tie(ignore,ignore,ans)=(vec[i])
      |                                     ^
      |                                     ;
   21 |      cout << ans << endl;
      |      ~~~~                            
a.cc:22:3: error: expected '}' at end of input
   22 |  }
      |   ^
a.cc:6:13: note: to match this '{'
    6 |  int main() {
      |             ^
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;cin>>N;
	vector<tuple<string,int,int>> vec(N);
    rep(i,N){
      string st="";cin>>st
      int a=0;cin>>a;
      tup = make_tuple(st,-a,i+1);
      vec.push_back(tup);
    }
   
   sort(vec.begin(),vec.end());
   
   rep(i,N){
     int ans;
     tie(ignore,ignore,a)=(vec[i])
     cout << a << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: expected ';' before 'int'
   10 |       string st="";cin>>st
      |                           ^
      |                           ;
   11 |       int a=0;cin>>a;
      |       ~~~                  
a.cc:11:20: error: 'a' was not declared in this scope
   11 |       int a=0;cin>>a;
      |                    ^
a.cc:12:7: error: 'tup' was not declared in this scope; did you mean 'dup'?
   12 |       tup = make_tuple(st,-a,i+1);
      |       ^~~
      |       dup
a.cc:20:24: error: 'a' was not declared in this scope
   20 |      tie(ignore,ignore,a)=(vec[i])
      |                        ^
a.cc:22:3: error: expected '}' at end of input
   22 |  }
      |   ^
a.cc:6:13: note: to match this '{'
    6 |  int main() {
      |             ^
Language: C++

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

int main() {
    int N;
    cin >> N;

    vector<pair<int, int>> restaurant(N);

    for(int i = 0; i < N; i++) {
        char location[11];
        int ascii_loc;
        int score;
        cin >> location >> score;
        ascii_loc = (int)location;
        restaurant.at(i) = make_pair(ascii_loc, score);
    }

    vector<pair<int, int>> unsorted_rest = restaurant; // 未ソート状態の配列を取っておく
    sort(restaurant.begin(), restaurant.end(), greater<pair<int, int>>());

    for(int i = 0; i < N; i++) {
        int i_loc;
        int i_score;
        tie(i_loc, i_score) = restaurant.at(i);
        for(int j = 0; j < N; j++) {
            int j_loc;
            int j_score;
            tie(j_loc, j_score) = unsorted_rest.at(j);
            if(i_loc == j_loc && i_score == j_score) {
                cout << j + 1 << endl;
            }
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   15 |         ascii_loc = (int)location;
      |                     ^~~~~~~~~~~~~
Language: C++

#pragma GCC optimize("Ofast") 
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define sz(a) a.size()
#define all(a) a.begin(),a.end()
#define lb lower_bound
#define ub upper_bound
#define owo ios_base::sync_with_stdio(0);cin.tie(0);
#define MOD (ll)(1e8)
#define INF (ll)(1e18)
#define debug(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#define time__(d) for(long blockTime = 0; (blockTime == 0 ? (blockTime=clock()) != 0 : false);\
debug("%s time : %.4fs\n", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))
typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> PII;
typedef pair<int,int> pii;
typedef vector<vector<int>> vii;
typedef vector<vector<ll>> VII;
ll gcd(ll a,ll b){if(!b)return a;else return gcd(b,a%b);}
int main()
{
 int n;
  cin>>n;
  map<string,vector<pii>>cnt;
  for(int i=1;i<=n;i++){
    string s;
    int a;
    cin>>s>>a;
    cnt[s].pb({a,i});
  }
  for(auto x:cnt){
   vector<pii>l = x.se;
    sort(all(l),greater<pii>());
    for(auto y:p)cout<<y.se<<'\n';
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:16: error: 'p' was not declared in this scope
   38 |     for(auto y:p)cout<<y.se<<'\n';
      |                ^
Language: C++

#pragma GCC optimize("Ofast") 
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define sz(a) a.size()
#define all(a) a.begin(),a.end()
#define lb lower_bound
#define ub upper_bound
#define owo ios_base::sync_with_stdio(0);cin.tie(0);
#define MOD (ll)(1e8)
#define INF (ll)(1e18)
#define debug(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#define time__(d) for(long blockTime = 0; (blockTime == 0 ? (blockTime=clock()) != 0 : false);\
debug("%s time : %.4fs\n", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))
typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> PII;
typedef pair<int,int> pii;
typedef vector<vector<int>> vii;
typedef vector<vector<ll>> VII;
ll gcd(ll a,ll b){if(!b)return a;else return gcd(b,a%b);}
int main()
{
 int n;
  cin>>n;
  map<string,vector<pii>>cnt;
  for(int i=1;i<=n;i++){
    string s;
    int a;
    cin>>s>>a;
    cnt[s].pb({a,i});
  }
  for(auto x:cnt){
   vector<pii>l = x.se;
    sort(all(l),greater<pii>());
    for(auto y:p)cout<<p.se<<'\n';
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:16: error: 'p' was not declared in this scope
   38 |     for(auto y:p)cout<<p.se<<'\n';
      |                ^
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    String[] S;
    int[] P;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        N = sc.nextInt();
        S = new String[N];
        P = new int[N];
        for (int i=0; i<N; i++) {
        	S[i] = sc.next();
        	P[i] = sc.nextInt();
        }
    }
    
    //解答処理
    private List<MainRestaurant> solve() {
    	List<MainRestaurant> restaurant = new ArrayList<MainRestaurant>();
        
    	for (int i=0; i<N; i++) {
    		MainRestaurant res = new MainRestaurant();
    		res.setCity(S[i]); 
    		res.setPoint(P[i]);
    		res.setI(i+1);
    		restaurant.add(res);
    	}
    	
    	Collections.sort(restaurant);
        return restaurant;
    }
    
    //出力
    public void show(List<MainRestaurant> answer) {
        for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        }
    }

}


/**
 * ガイドブックに載せるレストランのデータを格納するクラス
 *
 */
public class MainRestaurant implements Comparable<MainRestaurant>{
	private String city;
	private int point;
	private int i;
	
	//public String getCity() {
	//	return city;
	//}
	public void setCity(String city) {
		this.city = city;
	}
	//public int getPoint() {
	//	return point;
	//}
	public void setPoint(int point) {
		this.point = point;
	}
	public int getI() {
		return i;
	}
	public void setI(int i) {
		this.i = i;
	}

	//点数を比較するメソッド
	public int compareTo(MainRestaurant other) {
	    int ans = city.compareTo(other.city);
	    if (ans != 0) return ans;
	    return Integer.compare(other.point, point);
	  }
}


Compiler output:
Main.java:62: error: class MainRestaurant is public, should be declared in a file named MainRestaurant.java
public class MainRestaurant implements Comparable<MainRestaurant>{
       ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    String[] S;
    int[] P;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        N = sc.nextInt();
        S = new String[N];
        P = new int[N];
        for (int i=0; i<N; i++) {
        	S[i] = sc.next();
        	P[i] = sc.nextInt();
        }
    }
    
    //解答処理
    private List<Main9Restaurant> solve() {
    	List<MainRestaurant> restaurant = new ArrayList<MainRestaurant>();
        
    	for (int i=0; i<N; i++) {
    		MainRestaurant res = new MainRestaurant();
    		res.setCity(S[i]); 
    		res.setPoint(P[i]);
    		res.setI(i+1);
    		restaurant.add(res);
    	}
    	
    	Collections.sort(restaurant);
        return restaurant;
    }
    
    //出力
    public void show(List<Main9Restaurant> answer) {
        for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        }
    }

}


/**
 * ガイドブックに載せるレストランのデータを格納するクラス
 *
 */
public class MainRestaurant implements Comparable<MainRestaurant>{
	private String city;
	private int point;
	private int i;
	
	//public String getCity() {
	//	return city;
	//}
	public void setCity(String city) {
		this.city = city;
	}
	//public int getPoint() {
	//	return point;
	//}
	public void setPoint(int point) {
		this.point = point;
	}
	public int getI() {
		return i;
	}
	public void setI(int i) {
		this.i = i;
	}

	//点数を比較するメソッド
	public int compareTo(MainRestaurant other) {
	    int ans = city.compareTo(other.city);
	    if (ans != 0) return ans;
	    return Integer.compare(other.point, point);
	  }
}


Compiler output:
Main.java:62: error: class MainRestaurant is public, should be declared in a file named MainRestaurant.java
public class MainRestaurant implements Comparable<MainRestaurant>{
       ^
Main.java:33: error: cannot find symbol
    private List<Main9Restaurant> solve() {
                 ^
  symbol:   class Main9Restaurant
  location: class Main
Main.java:49: error: cannot find symbol
    public void show(List<Main9Restaurant> answer) {
                          ^
  symbol:   class Main9Restaurant
  location: class Main
3 errors
Language: C++

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

int main(){
  int N;
  cin >> N ;
  
  vector<tuple<string,int,int>> name_score(N);
  
  string name;
  int score;
  int k=1;
  for(int i=0;i<N;i++){
    cin >>name>>score;
    name_score[i]=make_tuple(name,score,k);
    k++;
  }
  
  sort(name_score.begin(),name_score.begin());
  reverse(name_score.begin(),name_score.begin());
  
  for(int i=0;i<N;i++){
    int num;
    tie(ignore,ignore,num)=name_score[i]
    cout<<num<<endl;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:24:41: error: expected ';' before 'cout'
   24 |     tie(ignore,ignore,num)=name_score[i]
      |                                         ^
      |                                         ;
   25 |     cout<<num<<endl;
      |     ~~~~
Language: C++

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

int main(){
  int N;
  cin >> N ;
  
  using vti=vector<tuple<string,int,int>>;
  vti name_score(N);
  
  string name;
  int score;
  
  for(int i=0;i<N;i++){
    cin >>name>>score;
    name_score[i]=make_tuple(name,score,i++);
  }
  
  sort(name_score.begin(),name_score.begin());
  reverse(name_score.begin(),name_score.begin());
  
  for(int x:name_score){
    int num;
    tie(ignore,ignore,num)=name_score[x];
    cout<<num<<endl;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: cannot convert 'std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>' to 'int' in initialization
   22 |   for(int x:name_score){
      |             ^~~~~~~~~~
Language: C++

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

int main(){
  int N;
  cin >> N ;
  
  using vpi=vector<tuple<string,int,int>>;
  vti name_score(N);
  
  string name;
  int score;
  
  for(int i=0;i<N;i++){
    cin >>name>>score;
    name_score[i]=make_tuple(name,score,i++);
  }
  
  sort(name_acore.begin(),name_score.begin());
  reverse(name_acore.begin(),name_score.begin());
  
  for(auto x:name_score){
    int num;
    tie(ignore,ignore,num)=name_score[x];
    cout<<num<<endl;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vti' was not declared in this scope; did you mean 'vpi'?
    9 |   vti name_score(N);
      |   ^~~
      |   vpi
a.cc:16:5: error: 'name_score' was not declared in this scope
   16 |     name_score[i]=make_tuple(name,score,i++);
      |     ^~~~~~~~~~
a.cc:19:8: error: 'name_acore' was not declared in this scope
   19 |   sort(name_acore.begin(),name_score.begin());
      |        ^~~~~~~~~~
a.cc:19:27: error: 'name_score' was not declared in this scope
   19 |   sort(name_acore.begin(),name_score.begin());
      |                           ^~~~~~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<pair<string, int>> data(N);
  for(int i = 0; i < N; i++) {
    string s;
    int p;
    cin >> s >> p;
    data.at(i) = make_pair(s, p);
  }
  sort(data.begin(), data.end());
  
  for(int i = 0; i < N; i++) {
    if(data.at(i).first == data.at(i + 1).first) {
      if(data.at(i).second < data.at(i + 1).second) {
        data.at(i) = data.at(i + 1);
        data.at(i + 1) = data.at(i);
      }
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:23:4: error: expected '}' at end of input
   23 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define pi 3.14159265359
using namespace std;
const long long INF=1e9+7;
const string alp="abcdefghijklmnopqrstuvwxyz"; //26
const string ALP="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
//const ll MOD=998244353LL;
//const ll MOD=1777777777LL;


int main() {
  ll N;
  cin>>N;
  vector<pair<ll,string>> res(N);
  vector<pair<ll,string>> ans(N);
  rep(i,N){
    cin>>res[i].second()>>res[i].first();
    ans[i].second()=res[i].second();
    ans[i].first()=res[i].first();
  }
  sort(res.begin(),res.end());
  reverse(res.begin(),res.end());
  rep(i,N-1){
    if(res[i].first()==res[i+1].first()){
      swap(res[i],res[i+1]);
    }
  }
  rep(i,N){
    rep(j,N){
      if(res[i]==ans[j]){
        cout<<j+1<<endl;
        break;
      }
    }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:23: error: no match for call to '(std::__cxx11::basic_string<char>) ()'
   24 |     cin>>res[i].second()>>res[i].first();
      |          ~~~~~~~~~~~~~^~
a.cc:24:39: error: expression cannot be used as a function
   24 |     cin>>res[i].second()>>res[i].first();
      |                           ~~~~~~~~~~~~^~
a.cc:25:18: error: no match for call to '(std::__cxx11::basic_string<char>) ()'
   25 |     ans[i].second()=res[i].second();
      |     ~~~~~~~~~~~~~^~
a.cc:25:34: error: no match for call to '(std::__cxx11::basic_string<char>) ()'
   25 |     ans[i].second()=res[i].second();
      |                     ~~~~~~~~~~~~~^~
a.cc:26:17: error: expression cannot be used as a function
   26 |     ans[i].first()=res[i].first();
      |     ~~~~~~~~~~~~^~
a.cc:26:32: error: expression cannot be used as a function
   26 |     ans[i].first()=res[i].first();
      |                    ~~~~~~~~~~~~^~
a.cc:31:20: error: expression cannot be used as a function
   31 |     if(res[i].first()==res[i+1].first()){
      |        ~~~~~~~~~~~~^~
a.cc:31:38: error: expression cannot be used as a function
   31 |     if(res[i].first()==res[i+1].first()){
      |                        ~~~~~~~~~~~~~~^~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define pi 3.14159265359
using namespace std;
const long long INF=1e9+7;
const string alp="abcdefghijklmnopqrstuvwxyz"; //26
const string ALP="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
//const ll MOD=998244353LL;
//const ll MOD=1777777777LL;


int main() {
  ll N;
  cin>>N;
  vector<pair<ll,string> res(N);
  vector<pair<ll,string> ans(N);
  rep(i,N){
    cin>>res[i].second()>>res[i].first();
    ans[i].second()=res[i].second();
    ans[i].first()=res[i].first();
  }
  sort(res.begin(),res.end());
  reverse(res.begin(),res.end());
  rep(i,N-1){
    if(res[i].first()==res[i+1].first()){
      swap(res[i],res[i+1]);
    }
  }
  rep(i,N){
    rep(j,N){
      if(res[i]==ans[j]){
        cout<<j+1<<endl;
        break;
      }
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:31: error: template argument 1 is invalid
   21 |   vector<pair<ll,string> res(N);
      |                               ^
a.cc:21:31: error: template argument 2 is invalid
a.cc:22:31: error: template argument 1 is invalid
   22 |   vector<pair<ll,string> ans(N);
      |                               ^
a.cc:22:31: error: template argument 2 is invalid
a.cc:24:10: error: 'res' was not declared in this scope; did you mean 'rep'?
   24 |     cin>>res[i].second()>>res[i].first();
      |          ^~~
      |          rep
a.cc:25:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |     ans[i].second()=res[i].second();
      |     ^~~
      |     abs
a.cc:28:8: error: 'res' was not declared in this scope; did you mean 'rep'?
   28 |   sort(res.begin(),res.end());
      |        ^~~
      |        rep
a.cc:37:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   37 |       if(res[i]==ans[j]){
      |                  ^~~
      |                  abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<pair<pair<string,int>>,int>rest(N);
  for(int i=0;i<N;i++){
    cin >> rest.at(i).first;
    rest.at(i).second=i+1;
  }
  sort(rest.begin(),rest.end());
  for(int a=0;a<N;a++){
    cout << rest.at(a).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>rest(N);
      |                              ^~
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>rest(N);
      |                                    ^
a.cc:9:17: error: request for member 'at' in 'rest', which is of non-class type 'int'
    9 |     cin >> rest.at(i).first;
      |                 ^~
a.cc:10:10: error: request for member 'at' in 'rest', which is of non-class type 'int'
   10 |     rest.at(i).second=i+1;
      |          ^~
a.cc:12:13: error: request for member 'begin' in 'rest', which is of non-class type 'int'
   12 |   sort(rest.begin(),rest.end());
      |             ^~~~~
a.cc:12:26: error: request for member 'end' in 'rest', which is of non-class type 'int'
   12 |   sort(rest.begin(),rest.end());
      |                          ^~~
a.cc:14:18: error: request for member 'at' in 'rest', which is of non-class type 'int'
   14 |     cout << rest.at(a).second<<endl;
      |                  ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<pair<pair<string,int>,int>rest(N);
  for(int i=0;i<N;i++){
    cin >> rest.at(i).first;
    rest.at(i).second=i+1;
  }
  sort(rest.begin(),rest.end());
  for(int a=0;a<N;a++){
    cout << rest.at(a).second<<endl;
  }
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:42: error: template argument 1 is invalid
    7 |   vector<pair<pair<string,int>,int>rest(N);
      |                                          ^
a.cc:7:42: error: template argument 2 is invalid
a.cc:9:12: error: 'rest' was not declared in this scope
    9 |     cin >> rest.at(i).first;
      |            ^~~~
a.cc:12:8: error: 'rest' was not declared in this scope
   12 |   sort(rest.begin(),rest.end());
      |        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP2(i, n) for (int i = 1; i <= (int)(n); i++)
#define FOR(i, m, n) for (int i = m; i<n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(x.begin(), x.end(),0);
#define vint(v,n) vector<int> v(n); REP(i,n) scanf("%lld", &v[i]);
#define vstr(v,n) vector<string> v(n); REP(i,n) scanf("%lld", &v[i]);
struct initon
{
    initon()
    {
        cin.tie(0);
        ios::sync_with_stdio(false);
    };
};
int k=0,n=0, m=0, l=0,a=0, b=0, c=0, d=0,e=0,ans=0,ans2=0,x=0,y=0;
string s,t,S;
signed main() {
    cin >> n;
    vector<pair<pair<string, int>,int> L;
    REP(i, n)
    {
        cin >> s >> a;
        L[i] = make_pair(make_pair(s,-a), i);
    }
    SORT(L);
    REP(i, n)
        cout << L[i].second + 1<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:40: error: template argument 1 is invalid
   25 |     vector<pair<pair<string, int>,int> L;
      |                                        ^
a.cc:25:40: error: template argument 2 is invalid
a.cc:29:9: error: 'L' was not declared in this scope
   29 |         L[i] = make_pair(make_pair(s,-a), i);
      |         ^
a.cc:31:10: error: 'L' was not declared in this scope
   31 |     SORT(L);
      |          ^
a.cc:7:22: note: in definition of macro 'SORT'
    7 | #define SORT(x) sort(x.begin(), x.end())
      |                      ^
Language: C++

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

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rep2(i,s,n) for(int i = (s); i < (n); ++i)
#define ll long long
#define ld long double
#define P pair<ll,ll>
#define all(v) v.begin(),v.end()

const ll mod = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1.0);

int main(void)
{
    
    ll n; cin>>n;
    vector<tuple<string,ll,ll>> a;
    for(ll i=1;i<=n;i++){
        string s;
        ll p;
        cin>>s>>p;
        p=-p;
        a.push_back(tie(s,p,i+1));
    }
    sort(all(a));

    rep(i,n){
        cout<< get<2>(a[i]) <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:30: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
   25 |         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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/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> >, long long int, long long int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
Language: C++

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

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rep2(i,s,n) for(int i = (s); i < (n); ++i)
#define ll long long
#define ld long double
#define P pair<ll,ll>
#define all(v) v.begin(),v.end()

const ll mod = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1.0);

int main(void)
{
    
    ll n; cin>>n;
    vector<tuple<string,ll,ll>> a;
    for(ll i=1;i<=n;i++){
        string s;
        ll p;
        cin>>s>>p;
        a.push_back(tie(s,-p,i+1));
    }
    sort(all(a));

    rep(i,n){
        cout<< get<2>(a[i]) <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:27: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
   24 |         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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 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> >, long long int, long long int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
Language: C++

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

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rep2(i,s,n) for(int i = (s); i < (n); ++i)
#define ll long long
#define ld long double
#define P pair<ll,ll>
#define all(v) v.begin(),v.end()

const ll mod = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1.0);

int main(void)
{
    
    ll n; cin>>n;
    vector<tuple<string,ll,ll>> a;
    for(ll i=1;i<=n;i++){
        string s;
        ll p;
        cin>>s>>p;
        a.push_back(tie(s,-p,i+1));
    }
    sort(all(a));

    rep(i,n){
        cout< <get<2>(a[i]) <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:27: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
   24 |         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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 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> >, long long int, long long int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
a.cc:29:15: error: expected primary-expression before '<' token
   29 |         cout< <get<2>(a[i]) <<endl;
      |               ^
a.cc:29:29: error: invalid operands of types 'std::__tuple_element_t<2, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long long int, long long int> >' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator<<'
   29 |         cout< <get<2>(a[i]) <<endl;
      |                ~~~~~~~~~~~~~^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:45: error: 'N' was not declared in this scope
    7 |   vector<pair<pair<string, int>, int>> rest(N);
      |                                             ^
Language: C++

/* Note:
Check constants at the beginning of the code.
    N is set to 4e5 but be careful in problems with large constant factor.
    Setting N in every problem is more effective.
Check corner cases.
    N = 1
No def int long long for now.
Add something here.

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

int mod = 1000000007;
ll dp[100005];
const ll INF = 1e18;

ll gcd(long long a,long long b){
  if(b == 0)
    return a;
  else return gcd(b,a%b);
}

bool sortbyval(const pair<string, int> &a,
               const pair<string, int> &b){
    return (a.second < b.second);
}


int main(){

 int N, p;
  string s;
  cin >> N;

  vector<pair<pair<string, int>, int>> rest(N);
 for(auto i = 0; i < N; i++) {
    cin>>s>>p;

    reset.at(i).first.first = s;
    reset.at(i).first.second = -p;  //intentionally using the minus sign so that the
    // functions will sort the elements in the greatner ness order

    reset.at(i).second = i+1;
 }

 sort(reset.begin(),reset.end());

 for(auto i : rest) {
    cout << i.second << endl;
  }

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:5: error: 'reset' was not declared in this scope; did you mean 'rest'?
   43 |     reset.at(i).first.first = s;
      |     ^~~~~
      |     rest
a.cc:50:7: error: 'reset' was not declared in this scope; did you mean 'rest'?
   50 |  sort(reset.begin(),reset.end());
      |       ^~~~~
      |       rest
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:36: error: expected primary-expression before ')' token
   15 |     a.at(i).first = make_pair(s,-p,);
      |                                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
bool sortby(const pair<pair<string,int>,int> &a,const pair<pair<string,int>,int> &b){
     string x = a.first.first;
     string y = b.first.first;
     return lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
    //return (a.first.second < b.first.second);
}
bool sortby2(const pair<pair<string,int>,int> &a,const pair<pair<string,int>,int> &b){
     // return lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
    return (a.first.second > b.first.second);
}  
 
int main(){
  std::vector<pair<pair<string,int>,int>> v;
  int N;
  cin >> N;
  for(int i=0;i<N;i+=1){
     int b,c;
     string a;
     cin >> a >> b;
     v.push_back(make_pair(make_pair(a,b),i+1)); 
  }
  
  sort(v.begin(),v.end());
  #sort(v.begin(),v.end(),sortby);
  for(auto x:v){
     cout << x.second <<endl ;
  }
}=

Compiler output:
a.cc:27:4: error: invalid preprocessing directive #sort
   27 |   #sort(v.begin(),v.end(),sortby);
      |    ^~~~
a.cc:31:2: error: expected unqualified-id before '=' token
   31 | }=
      |  ^
Language: C++

//Guidebook

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

int main()
{

  int N;
  cin >> N;
  vector<tuple<string, int, int>> a(N);

  for (int i = 0; i < N; i++)
  {
    string S;
    int P;
    cin >> S >> P;
    P = -P; //点数を大きい順にするため
    a.at(i) = make_tuple(S, P, i + 1);
  }

  sort(a.begin(), a.end());

  for (int i = 0; i < N; i++)
  {
    string S;
    int p;
    int id;
    tie(S, P, id) = a[i];
    cout << id << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:12: error: 'P' was not declared in this scope
   29 |     tie(S, P, id) = a[i];
      |            ^
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>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
    int N;
    cin >> N;
    vector<pair<pair<string, int>, int>> pairs;
    string s; int p;
    rep(i, N){
        cin >> s >> p;
        pairs.push_back(make_pair(make_pair(s, -p), i + 1));
    }
    sort(pairs.begin(), pairs.end());

    rep(i, N){
        cout << pairs.at(i).second << endl;
    }
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

const int M = 1000005;

int main() {
  int n;
  cin >> n;
  vector<tuple<string, int, int>> v;
  rep(i, n){
    string s;
    int tmp;
    v.push_back(make_tuple(s, tmp*(-1), i+1));
  }

  sort(v.begin(), b.end());

  rep(i, n){
    cout << get<2>(v[i]) << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: 'b' was not declared in this scope
   20 |   sort(v.begin(), b.end());
      |                   ^
Language: C++

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

const int M = 1000005;

int main() {
  int n;
  cin >> n;
  vector<tuple<string, int. int>> v;
  rep(i, n){
    string s;
    int tmp;
    v.push_back(make_tuple(s, tmp*(-1), i+1));
  }

  sort(v.begin(), b.end());

  rep(i, n){
    cout << get<2>(v[i]) << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:32: error: template argument 2 is invalid
   13 |   vector<tuple<string, int. int>> v;
      |                                ^~
a.cc:13:35: error: template argument 1 is invalid
   13 |   vector<tuple<string, int. int>> v;
      |                                   ^
a.cc:13:35: error: template argument 2 is invalid
a.cc:17:5: error: 'v' was not declared in this scope
   17 |     v.push_back(make_tuple(s, tmp*(-1), i+1));
      |     ^
a.cc:20:8: error: 'v' was not declared in this scope
   20 |   sort(v.begin(), b.end());
      |        ^
a.cc:20:19: error: 'b' was not declared in this scope
   20 |   sort(v.begin(), b.end());
      |                   ^
Language: C++

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define INF 2e9
#define MOD 1000000007
#define MOD9 998244353
#define intMAX 51000;
#define PI 3.14159265359
using namespace std;
typedef long long llong;
// typedef long double ldouble;

using Graph = vector<vector<int>>;

// int ctoi(const char c){
//   if('0' <= c && c <= '9') return (c-'0');
//   return -1;
// }

// int gcd(int a, int b){
//   int ma = max(a,b);
//   int mi = min(a,b);
//   if(mi == 0) return ma;

//   return gcd(mi, ma%mi);
// }

// llong POW(llong a, llong b){
//   if(b == 0) return 1;
//   else{
//     if(b%2 == 0) return POW(a * a % MOD, b / 2) % MOD;
//     else return a * POW(a * a % MOD, b / 2) % MOD;
//   }
// }

int main(){
	int N;
	cin >> N;
	pair<pair<string, int>, int> rest[N];
	for(int i=0; i<N; ++i) {
		string S;
		int A, B;
		cin >> S >> A;
		rest[i] = make_pair(make_pair(S, -A), i);
	}
	sort(rest.begin(), rest.end());
	for(int i=0; i<N; ++i) cout << rest.second+1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:19: error: request for member 'begin' in 'rest', which is of non-class type 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [N]'
   47 |         sort(rest.begin(), rest.end());
      |                   ^~~~~
a.cc:47:33: error: request for member 'end' in 'rest', which is of non-class type 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [N]'
   47 |         sort(rest.begin(), rest.end());
      |                                 ^~~
a.cc:48:45: error: request for member 'second' in 'rest', which is of non-class type 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [N]'
   48 |         for(int i=0; i<N; ++i) cout << rest.second+1 << endl;
      |                                             ^~~~~~
Language: C++

//use pair to make pair
#include "iostream"
#include "set"
using namespace std;
char ch[105];
int main()
{
    pair<pair<string,int>,int> p[110];
    int t;
    cin>>t;
    int l;
    for(int i=0;i<t;i++)
    {
        cin>>ch>>l;
        string temp=ch;
        p[i]=make_pair(make_pair(ch,-l),i);
        
    }
    
    sort(p,p+t);
    
    for(int i=0;i<t;i++)
    {
        cout<<p[i].second+1<<endl;
    }
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |     sort(p,p+t);
      |     ^~~~
      |     short
Language: C++

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

int main(){
	int n;
	cin >> n;
	vector<pair<string, int, int>> a(n);
	rep(i, n){
		string s;
		int p;
		cin >> s >> p;
		p *= -1;
		a.push_back(tie(s, p, i));
	}

	sort(a.begin(), a.end());

	rep(i, n){
		string s;
		int p,id;
		tie(s, p, id) = a.at(i);
		cout << id << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: wrong number of template arguments (3, should be 2)
    9 |         vector<pair<string, int, int>> a(n);
      |                                  ^~~
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:9:37: error: template argument 1 is invalid
    9 |         vector<pair<string, int, int>> a(n);
      |                                     ^~
a.cc:9:37: error: template argument 2 is invalid
a.cc:15:19: error: request for member 'push_back' in 'a', which is of non-class type 'int'
   15 |                 a.push_back(tie(s, p, i));
      |                   ^~~~~~~~~
a.cc:18:16: error: request for member 'begin' in 'a', which is of non-class type 'int'
   18 |         sort(a.begin(), a.end());
      |                ^~~~~
a.cc:18:27: error: request for member 'end' in 'a', which is of non-class type 'int'
   18 |         sort(a.begin(), a.end());
      |                           ^~~
a.cc:23:35: error: request for member 'at' in 'a', which is of non-class type 'int'
   23 |                 tie(s, p, id) = a.at(i);
      |                                   ^~
Language: C++

#include <iostream>
#include <vector>
#include <string>

int main()
{
	int n;
	std::cin >> n;
	std::vector<std::pair<std::pair<std::string, int>, int> > S;
	for (int i = 0; i < n; i++)
	{
		
		std::string s;
		int p;
		std::cin >> s >> p;
		S.push_back( std::make_pair(std::make_pair(s, -p), i));
	}
	std::sort(S.begin(), S.end());
	for (std::vector<std::pair<std::pair<std::string, int>, int> >::iterator i = S.begin(); i != S.end(); i++)
	{
		std::cout << (*i).second + 1 << '\n';
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   18 |         std::sort(S.begin(), S.end());
      |              ^~~~
      |              qsort
Language: C++

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

int main() {
	int N;
	cin >> N;

	vector<touple<string, int, int>> data(N);

	rep(i, N) {
		string s;
		int p;
		cin >> s >> p;
      int pp = -p;
      int ii = i + 1;
		data.at(i) = make_touple(s, pp, ii);
	}

	sort(data.begin(), data.end());
  
  rep(i,N){
    cout << get<3>(data[i]) << endl;
  }
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'touple' was not declared in this scope; did you mean 'toupper'?
    9 |         vector<touple<string, int, int>> data(N);
      |                ^~~~~~
      |                toupper
a.cc:9:36: error: wrong number of template arguments (3, should be at least 1)
    9 |         vector<touple<string, int, int>> data(N);
      |                                    ^~~
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:39: error: expected unqualified-id before '>' token
    9 |         vector<touple<string, int, int>> data(N);
      |                                       ^~
a.cc:17:22: error: overloaded function with no contextual type information
   17 |                 data.at(i) = make_touple(s, pp, ii);
      |                      ^~
a.cc:17:30: error: 'make_touple' was not declared in this scope
   17 |                 data.at(i) = make_touple(s, pp, ii);
      |                              ^~~~~~~~~~~
a.cc:20:19: error: overloaded function with no contextual type information
   20 |         sort(data.begin(), data.end());
      |                   ^~~~~
a.cc:20:33: error: overloaded function with no contextual type information
   20 |         sort(data.begin(), data.end());
      |                                 ^~~
a.cc:23:24: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   23 |     cout << get<3>(data[i]) << endl;
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for(ll i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(),(x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using P = pair<ll, ll>;
#define debug(var) cerr << "[" << #var << "] " << var << endl
#define chmin(x, y) x = min(x, y)
const ll mod = 1000000007;
const int dx[] = {-1,0,1,0};
const int dy[] = {0,-1,0,1};

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

int main()
{
  int n;
  cin >> n;
  vector<Store> st;
  rep(i, n) {
    string s;
    int p;
    cin >> s >> p;
    st.emplace_back(i+1, s, p);
  }
  auto comp = [](Store a, Store b) {
    if (a.s!=b.s) return a.s<b.s;
    else return a.p>b.p
  };
  sort(whole(st), comp);
  
  rep(i, n) {
    cout << st[i].i << endl;
  }
    
  return 0;
}







Compiler output:
a.cc: In lambda function:
a.cc:33:24: error: expected ';' before '}' token
   33 |     else return a.p>b.p
      |                        ^
      |                        ;
   34 |   };
      |   ~