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

#include <bits/stdc++.h>
using namespace std ;
int main(){
    int N ;
    cin >> N ;
    vector<pair<char,int>> p(N) ;
    for(int i = 0; i < N; i++){
       char a ;
       int b ;
       cin >> a >> b ;
       p(i) = make_pair(a,b) ;
    }
    sort(p.begin(), p.end() ) ;
    for(int i = 0; i < N; i++){
        char a;
        int b ;
        tie(a, b) = p(i) ;
        cout << a << " " << b << endl ;
    }
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: no match for call to '(std::vector<std::pair<char, int> >) (int&)'
   11 |        p(i) = make_pair(a,b) ;
      |        ~^~~
a.cc:17:22: error: no match for call to '(std::vector<std::pair<char, int> >) (int&)'
   17 |         tie(a, b) = p(i) ;
      |                     ~^~~
Language: C++

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

int main(){
  int N; cin >>N;
  vector<tuple<string,int,int>> R(N);
  repeat(i,N){
    string S;
    int P;
    cin >>S>>P;
    R.at(i) = make_tuple(S,P,i+1);
  }
  sort(R.begin(),R.end());
  reverse(R.begin(),R.end());
  
  repeat(i,N){
    int ans;
    ans = get<2>(R.at(i));
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'i' was not declared in this scope
   12 |     R.at(i) = make_tuple(S,P,i+1);
      |          ^
a.cc:19:23: error: 'i' was not declared in this scope
   19 |     ans = get<2>(R.at(i));
      |                       ^
Language: C++

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

int main(){
  int N; cin >>N;
  vector<tuple<string,int,int>> R(N);
  repeat(i,N){
    string S;
    int P;
    cin >>S>>P;
    R[i] = make_tuple(S,P,i+1);
  }
  sort(R.begin(),R.end());
  reverse(R.begin(),R.end());
  
  repeat(i,N){
    int ans;
    ans = get<2>(R[i]);
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'i' was not declared in this scope
   12 |     R[i] = make_tuple(S,P,i+1);
      |       ^
a.cc:19:20: error: 'i' was not declared in this scope
   19 |     ans = get<2>(R[i]);
      |                    ^
Language: C++

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

int main(){
  int N; cin >>N;
  vector<tuple<string,int,int>> R(N);
  repeat(i,N){
    string S;
    int P;
    cin >>S>>P;
    R.at(i) = make_tuple(S,P,i+1);
  }
  sort(R.begin(),R.end());
  reverse(R.begin(),R.end());
  
  repeat(i,N){
    int ans;
    ans = get<2>(R.at(i));
    cout << ans << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'i' was not declared in this scope
   12 |     R.at(i) = make_tuple(S,P,i+1);
      |          ^
a.cc:19:23: error: 'i' was not declared in this scope
   19 |     ans = get<2>(R.at(i));
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#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++)

int main() {
  int N;
cin >> N;
  vecto<pair<string, int>> pairs(N);
  rep(i, N){
	cin >> pairs.at(i).first >> pairs.at(i).second;
pairs.at(i).second = pairs.at(i).second*1000 + 1 + i;
}
  sort(pairs.begin(), pairs.end());
rep(i, N)
  cout << pairs.at(i).second % 1000 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vecto' was not declared in this scope
    9 |   vecto<pair<string, int>> pairs(N);
      |   ^~~~~
a.cc:9:25: error: expected primary-expression before '>' token
    9 |   vecto<pair<string, int>> pairs(N);
      |                         ^~
a.cc:9:28: error: 'pairs' was not declared in this scope
    9 |   vecto<pair<string, int>> pairs(N);
      |                            ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#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++)

int main() {
  int N;
cin >> N;
  vecto<pair<string, int>> pairs(N);
  rep(i, N){
	cin >> pairs.at(i).first >> pairs.at(i).second;
pairs.at(i).second = pairs.at(i).second*100 + 1 + i;
}
  sort(pairs.begin(), pairs.end());
rep(i, N)
  cout << pairs.at(i).second % 100 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vecto' was not declared in this scope
    9 |   vecto<pair<string, int>> pairs(N);
      |   ^~~~~
a.cc:9:25: error: expected primary-expression before '>' token
    9 |   vecto<pair<string, int>> pairs(N);
      |                         ^~
a.cc:9:28: error: 'pairs' was not declared in this scope
    9 |   vecto<pair<string, int>> pairs(N);
      |                            ^~~~~
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[i].first.first >> rest[i].first.second;
		rest[i].first.second *= (-1);
		rest[i].second = i + 1;
	}
	
	sort(rest.begin(), rest.end());
	for(int i = 0; i < N; i++){
		cout << rest.second << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:30: error: 'class std::vector<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> >' has no member named 'second'
   16 |                 cout << rest.second << endl;
      |                              ^~~~~~
Language: C++

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

int main() {
  int n;
  cin >> n;
  int i;
  tuple<string, int, int> t[i];
  for(i = 1; i <= n; i++){
    string a;
    int b;
    cin >> a >> b;
    t[i - 1] = make_tuple(a, b, i);
  }
  for(int i = 0; i < n; i++)
    cout << t[i].third << endl;
}

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

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

int main() {
  int n;
  cin >> n;
  int i;
  tuple<string, int, int> t[i];
  for(i = 1; i <= n; i++){
    string a;
    int b;
    cin >> a >> b;
    t[i - 1] = make_tuple(a, b, i);
  }
  
  for(int i = 0; i < n; i++)
    cout << v.at(i).third << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'v' was not declared in this scope
   17 |     cout << v.at(i).third << endl;
      |             ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<tuple> v(n)
  for(int i = 1; i <= n; i++){
    string a;
    int b;
    cin >> a >> b;
    v.at(i - 1) = make_tuple(a, b, i);
  }
  sort(v.begin(), v.end());
  for(int i = 0; i < n; i++)
    cout << v.at(i).third << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
    7 |   vector<tuple> v(n)
      |               ^
a.cc:7:15: note:   expected a type, got 'tuple'
a.cc:7:15: error: template argument 2 is invalid
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i = 1; i <= n; i++){
      |   ^~~
a.cc:8:18: error: 'i' was not declared in this scope
    8 |   for(int i = 1; i <= n; i++){
      |                  ^
a.cc:14:10: error: request for member 'begin' in 'v', which is of non-class type 'int'
   14 |   sort(v.begin(), v.end());
      |          ^~~~~
a.cc:14:21: error: request for member 'end' in 'v', which is of non-class type 'int'
   14 |   sort(v.begin(), v.end());
      |                     ^~~
a.cc:16:15: error: request for member 'at' in 'v', which is of non-class type 'int'
   16 |     cout << v.at(i).third << endl;
      |               ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 'class std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >' has no member named 'bigen'
   17 |   sort(a.bigen(),a.end());
      |          ^~~~~
Language: Java

import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        String[] list = new String[N];
        for(int i = 0; i < n; i++) {
            String city = sc.next();
            int point = sc.nextInt();
            list[i] = city + "_" + (200 - point) + "_" + (i+1);
        }
        Arrays.sort(list);

        for(int i = 0; i < N; i++) {
            String ans = list[i].split("_")[2];
            System.out.println(ans);
        }   
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        for(int i = 0; i < n; i++) {
                           ^
  symbol:   variable n
  location: class Main
1 error
Language: C++

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

int main(){
    int n; cin >> n;
    vector<pair<pair<string, int>, int>> P(n);

    for (int i=0;i<n;i++) {
        string s;
        int p;
        cin >> s >> p;

        P.at(i).first = make_pair(s, -p);
        P.at(i).second = i;
    }

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

    for (int i=0;i<n;i++){
        cout << P.at(i).second + 1 << endl;
    }

    return 0;
}

Compiler output:
a.cc:1:9: fatal error: stdc++.h: No such file or directory
    1 | #include<stdc++.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

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

#define CPP_CAT(x,y) CPP_CAT_I(x,y)
#define CPP_CAT_I(x,y) x ## y
//#define CPP_STR(x) CPP_STR_I(x)
//#define CPP_STR_I(args...) #args
//#define ASSERT(expr...) assert((expr))

using i8 = int8_t;
using u8 = uint8_t;
using i16 = int16_t;
using u16 = uint16_t;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;
using f32 = float;
using f64 = double;
//using f80 = __float80;
#pragma endregion

#pragma region const
constexpr i64 INF = 1'010'000'000'000'000'017LL;
constexpr i64 MOD = 1'000'000'007LL;
constexpr f64 EPS = 1e-12;
constexpr f64 PI = 3.14159265358979323846;
#pragma endregion

#pragma region util
#define FOR(i, start, end) for(i64 i = (start), CPP_CAT(i,xxxx_end)=(end); i < CPP_CAT(i,xxxx_end); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(f,c,...) (([&](decltype((c)) cccc) { return (f)(std::begin(cccc), std::end(cccc), ## __VA_ARGS__); })(c))

template<typename C>
i64 SIZE(const C& c) { return static_cast<i64>(c.size()); }
template<typename T, size_t N>
i64 SIZE(const T(&)[N]) { return static_cast<i64>(N); }

template<typename T, typename U, typename Comp = less<>>
bool chmax(T& xmax, const U& x, Comp comp = {}) {
	if (comp(xmax, x)) {
		xmax = x;
		return true;
	}
	return false;
}
template<typename T, typename U, typename Comp = less<>>
bool chmin(T& xmin, const U& x, Comp comp = {}) {
	if (comp(x, xmin)) {
		xmin = x;
		return true;
	}
	return false;
}
#pragma endregion

#pragma region init
struct ProconInit {
	static constexpr int IOS_PREC = 15;
	static constexpr bool AUTOFLUSH = false;

	ProconInit() {
		cin.tie(nullptr);
		ios::sync_with_stdio(false);
		cout << fixed << setprecision(IOS_PREC);
		if (AUTOFLUSH)
			cout << unitbuf;
	}
} PROCON_INIT;
#pragma endregion

class Rest
{
public:
	i64 no;
	string city;
	i64 score;
};

int Main()
{
	i64 N;
	cin >> N;
	vector<Rest> R(N);
	REP(i, N)
	{
		R[i].no = i + 1;
		cin >> R[i].city;
		cin >> R[i].score;
	}

	ALL(sort, R, [](Rest l, Rest r) -> bool
	{
		if (l.city < r.city) return true;
		if (l.city > r.city) return false;
		if (l.score < r.score) return false;
		if (l.score > r.score) return true;
		return false;
	});

	REP(i, N)
	{
		cout << R[i].no << endl;
	}
	return 0;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {
    int N, j;
    cin >> N;
    pair<pair<string, int>, int> p[N];
    for (int i = 0; i < N; i++) {
        cin >> p[i].first.first >> j;
        p[i].first.second = -j;
        p[i].second = i + 1;
    }
    sort(p, p + N);
    for (int i = 0; i < N; i++)
        cout << p[i].second;
}

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

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <queue>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef pair<int, int> P;
const int c_INF = 111111111;
const int c_mINF = -111111111;
const int c_YET = -1;
const int c_Dx[4] = { 0,0,1,-1 };
const int c_Dy[4] = { 1,-1,0,0 };


char name[120];
pair<pair<string, int>, int> info[110];


int main() {
	int N;
	scanf("%d", &N);
	for (int i = 0; i < N; i++) {
		int temp; 
		scanf("%s%d", &name, &temp);
		info[i] = make_pair(make_pair(name, -temp), i);
	}

	sort(info, info + N);
	for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);

}



/*         提出前の確認事項

・デバッグ用の関数は＜＜コメント化＞＞しているか？
・すべての＜＜入力例＞＞は試したか？
・＜＜限界値分析＞＞はしたか？
・＜＜出力の改行＞＞の有無は確認したか？
　　　　　　　　↓
	 ＜＜提出先＞＞に注意して提出！！
*/

Compiler output:
a.cc:18:11: error: 'string' was not declared in this scope
   18 | pair<pair<string, int>, int> info[110];
      |           ^~~~~~
a.cc:6:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    5 | #include <queue>
  +++ |+#include <string>
    6 | using namespace std;
a.cc:18:22: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                      ^
a.cc:18:28: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                            ^
a.cc: In function 'int main()':
a.cc:27:36: error: cannot convert 'std::pair<std::pair<char*, int>, int>' to 'int' in assignment
   27 |                 info[i] = make_pair(make_pair(name, -temp), i);
      |                           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    std::pair<std::pair<char*, int>, int>
a.cc:30:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   30 |         sort(info, info + N);
      |         ^~~~
      |         sqrt
a.cc:31:59: error: request for member 'second' in 'info[i]', which is of non-class type 'int'
   31 |         for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);
      |                                                           ^~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <queue>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef pair<int, int> P;
const int c_INF = 111111111;
const int c_mINF = -111111111;
const int c_YET = -1;
const int c_Dx[4] = { 0,0,1,-1 };
const int c_Dy[4] = { 1,-1,0,0 };


char name[120];
pair<pair<string, int>, int> info[110];


int main() {
	int N;
	scanf("%d", &N);
	for (int i = 0; i < N; i++) {
		int temp; 
		scanf("%s%d", name, &temp);
		info[i] = make_pair(make_pair(name, -temp), i);
	}

	sort(info, info + N);
	for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);

}



/*         提出前の確認事項

・デバッグ用の関数は＜＜コメント化＞＞しているか？
・すべての＜＜入力例＞＞は試したか？
・＜＜限界値分析＞＞はしたか？
・＜＜出力の改行＞＞の有無は確認したか？
　　　　　　　　↓
	 ＜＜提出先＞＞に注意して提出！！
*/

Compiler output:
a.cc:18:11: error: 'string' was not declared in this scope
   18 | pair<pair<string, int>, int> info[110];
      |           ^~~~~~
a.cc:6:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    5 | #include <queue>
  +++ |+#include <string>
    6 | using namespace std;
a.cc:18:22: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                      ^
a.cc:18:28: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                            ^
a.cc: In function 'int main()':
a.cc:27:36: error: cannot convert 'std::pair<std::pair<char*, int>, int>' to 'int' in assignment
   27 |                 info[i] = make_pair(make_pair(name, -temp), i);
      |                           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    std::pair<std::pair<char*, int>, int>
a.cc:30:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   30 |         sort(info, info + N);
      |         ^~~~
      |         sqrt
a.cc:31:59: error: request for member 'second' in 'info[i]', which is of non-class type 'int'
   31 |         for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);
      |                                                           ^~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <queue>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef pair<int, int> P;
const int c_INF = 111111111;
const int c_mINF = -111111111;
const int c_YET = -1;
const int c_Dx[4] = { 0,0,1,-1 };
const int c_Dy[4] = { 1,-1,0,0 };


char name[120];
pair<pair<string, int>, int> info[110];


int main() {
	int N;
	scanf("%d", &N);
	for (int i = 0; i < N; i++) {
		int temp; scanf("%s%d", name, &temp);
		info[i] = make_pair(make_pair(name, -temp), i);
	}

	sort(info, info + N);
	for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);

}



/*         提出前の確認事項

・デバッグ用の関数は＜＜コメント化＞＞しているか？
・すべての＜＜入力例＞＞は試したか？
・＜＜限界値分析＞＞はしたか？
・＜＜出力の改行＞＞の有無は確認したか？
　　　　　　　　↓
	 ＜＜提出先＞＞に注意して提出！！
*/

Compiler output:
a.cc:18:11: error: 'string' was not declared in this scope
   18 | pair<pair<string, int>, int> info[110];
      |           ^~~~~~
a.cc:6:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    5 | #include <queue>
  +++ |+#include <string>
    6 | using namespace std;
a.cc:18:22: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                      ^
a.cc:18:28: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                            ^
a.cc: In function 'int main()':
a.cc:26:36: error: cannot convert 'std::pair<std::pair<char*, int>, int>' to 'int' in assignment
   26 |                 info[i] = make_pair(make_pair(name, -temp), i);
      |                           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    std::pair<std::pair<char*, int>, int>
a.cc:29:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   29 |         sort(info, info + N);
      |         ^~~~
      |         sqrt
a.cc:30:59: error: request for member 'second' in 'info[i]', which is of non-class type 'int'
   30 |         for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);
      |                                                           ^~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <queue>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef pair<int, int> P;
const int c_INF = 111111111;
const int c_mINF = -111111111;
const int c_YET = -1;
const int c_Dx[4] = { 0,0,1,-1 };
const int c_Dy[4] = { 1,-1,0,0 };


char in[120];
pair<pair<string, int>, int> info[110];


int main() {
	int N;
	scanf("%d", &N);
	for (int i = 0; i < N; i++) {
		int temp; scanf("%s%d", in, &temp);
		info[i] = make_pair(make_pair(in, -temp), i);
	}

	sort(info, info + N);
	for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);

}



/*         提出前の確認事項

・デバッグ用の関数は＜＜コメント化＞＞しているか？
・すべての＜＜入力例＞＞は試したか？
・＜＜限界値分析＞＞はしたか？
・＜＜出力の改行＞＞の有無は確認したか？
　　　　　　　　↓
	 ＜＜提出先＞＞に注意して提出！！
*/

Compiler output:
a.cc:18:11: error: 'string' was not declared in this scope
   18 | pair<pair<string, int>, int> info[110];
      |           ^~~~~~
a.cc:6:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    5 | #include <queue>
  +++ |+#include <string>
    6 | using namespace std;
a.cc:18:22: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                      ^
a.cc:18:28: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                            ^
a.cc: In function 'int main()':
a.cc:26:36: error: cannot convert 'std::pair<std::pair<char*, int>, int>' to 'int' in assignment
   26 |                 info[i] = make_pair(make_pair(in, -temp), i);
      |                           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    std::pair<std::pair<char*, int>, int>
a.cc:29:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   29 |         sort(info, info + N);
      |         ^~~~
      |         sqrt
a.cc:30:59: error: request for member 'second' in 'info[i]', which is of non-class type 'int'
   30 |         for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);
      |                                                           ^~~~~~
Language: C++

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

int main()
{
	int n;
	pair<pair<string,int>,int> r[100];
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		char s[11];
		int m;
		scanf("%s%d",s,&m);
		r[i]=make_pair(make_pair(s,-m),i+1);
	}
	sort(r,r+n);
	
	for(int i=0;i<n;i++) printf("%d\n",r[i].second);
	
	return 0;
}


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

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

int main()
{
	int n;
	pair<pair<string,int>,int> r[100];
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		char s[11];
		int m;
		scanf("%s%d",s,&m);
		r[i]=make_pair(make_pair(s,-m),i+1);
	}
	sort(r,r+n);
	
	for(int i=0;i<n;i++) printf("%d\n",r[i].second);
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |         sort(r,r+n);
      |         ^~~~
      |         short
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] list = new String[n];
      	for(int i = 0; i < n; i ++){
        	String restaurant = sc.next();
          	int score = sc.nextInt();
          	list[i] = restaurant + "_" + (110 - point) + "_" + (i + 1);
        }
      	Arrays.sort(list);
      	for(String s : list){
        	String ans = s.split("_")[2];
          	System.out.println(ans);
        }
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
          	list[i] = restaurant + "_" + (110 - point) + "_" + (i + 1);
          	                                    ^
  symbol:   variable point
  location: class Main
1 error
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] list = new String[n];
      	for(int i = 0; i < n; i ++){
        	String restaurant = sc.next();
          	int score = sc.nextInt();
          	list[i] = restaurant + "_" + (110 - point) + "_" + (i + 1);
        }
      	Arrays.sort(list);
      	for(String s : list){
        	int ans = s.split("_").get[2];
          	System.out.println(ans);
        }
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
          	list[i] = restaurant + "_" + (110 - point) + "_" + (i + 1);
          	                                    ^
  symbol:   variable point
  location: class Main
Main.java:15: error: cannot find symbol
        	int ans = s.split("_").get[2];
        	                      ^
  symbol:   variable get
  location: class String[]
2 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	String[] list = new String[n];
      	for(int i = 0; i < n; i ++){
        	String restaurant = sc.next();
          	int score = sc.nextInt();
          	list[i] = restaurant + "_" + (110 - point) + "_" + (i + 1);
        }
      	Arrays.sort(list);
      	for(String s : list){
        	int ans = s.split("_")[2];
          	System.out.println(ans);
        }
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
          	list[i] = restaurant + "_" + (110 - point) + "_" + (i + 1);
          	                                    ^
  symbol:   variable point
  location: class Main
Main.java:15: error: incompatible types: String cannot be converted to int
        	int ans = s.split("_")[2];
        	                      ^
2 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'at' in 'p', which is of non-class type 'int'
   11 |     p.at(i).first = make_pair(s, -p);
      |       ^~
a.cc:12:7: error: request for member 'at' in 'p', which is of non-class type 'int'
   12 |     p.at(i).second = i;
      |       ^~
Language: Java

import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Map<String, Integer> data = new TreeMap<>();

		for (int i = 0; i < n; i++) {
			String city = sc.next();
			int point = sc.nextInt();
            String cal = String.value(Math.abs(100 - point));
			data.put(city + cal, i + 1);
		}

		for (String key : data.keySet()) {
			System.out.println(data.get(key));
		}

		sc.close();
	}
}


Compiler output:
Main.java:14: error: method value in class String cannot be applied to given types;
            String cal = String.value(Math.abs(100 - point));
                               ^
  required: no arguments
  found:    int
  reason: actual and formal argument lists differ in length
1 error
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>>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());
    rep(i,n)
  cout << get<2>(a[i]) <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before '}' token
   13 |     a.push_back(tie(s,p,i))
      |                            ^
      |                            ;
   14 |   }
      |   ~
Language: C++

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

int main() {
  char in[120];
  pair<pair<string,int>,int> p[110];
  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)
  }
  sort(p,p+a);
  for(int i=0;i<a;i++)printf("%d\n",p[i].second+1);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:39: error: expected ';' before '}' token
   11 |     p[i]=make_pair(make_pair(in,-t),i)
      |                                       ^
      |                                       ;
   12 |   }
      |   ~
Language: C++

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

using namespace std;

typedef struct
{
    string name;
    int point;
    int num;
}food;
food A[10001];
bool paixu(const food &a,const food &b)
{
    if(a.name != b.name)
        return a.name<b.name;
    return a.point > b.point;
    
}
int main()
{
    int n;
    cin>>n;
    for(int i=0;i<n;i++)
    {
        cin>>A[i].name>>A[i].point;
        A[i].num = i+1;
    }
    sort(A,A+n,paixu);
    for(int i=0;i<n;i++)
        cout<<A[i].num<<endl;
        return 0;
    return 0;
}

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

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

using namespace std;

const long long mod = 1e9+7;

struct rest{
    int number;
    string str;
    int point;
};

int main(){
	int n;
    rest* array;
    cin >> n;

    array = new rest[n];

    for(int i = 0; i < n; i++){
        cin >> array[i].str >> array[i].point;
        array[i].number = i + 1;
    }

    sort(array, array+n, [](const rest& x, const rest& y){
        if(std::strcmp(x.str.c_str(), y.str.c_str()) == 0) return x.point > y.point;
        else return std::strcmp(x.str.c_str(), y.str.c_str()) < 0;
    });

    for(int i = 0; i < n; i++){
        cout << array[i].number << endl;
    }
}

Compiler output:
a.cc: In lambda function:
a.cc:29:17: error: 'strcmp' is not a member of 'std'
   29 |         if(std::strcmp(x.str.c_str(), y.str.c_str()) == 0) return x.point > y.point;
      |                 ^~~~~~
a.cc:30:26: error: 'strcmp' is not a member of 'std'
   30 |         else return std::strcmp(x.str.c_str(), y.str.c_str()) < 0;
      |                          ^~~~~~
Language: C++

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

using namespace std;

const long long mod = 1e9+7;

struct rest{
    int number;
    string str;
    int point;
};

int main(){
	int n;
    rest* array;
    cin >> n;

    array = new rest[n];

    for(int i = 0; i < n; i++){
        cin >> array[i].str >> array[i].point;
        array[i].number = i + 1;
    }

    sort(array, array+n, [](const rest& x, const rest& y){
        if(strcmp(x.str.c_str(), y.str.c_str()) == 0) return x.point > y.point;
        else return strcmp(x.str.c_str(), y.str.c_str()) < 0;
    });

    for(int i = 0; i < n; i++){
        cout << array[i].number << endl;
    }
}

Compiler output:
a.cc: In lambda function:
a.cc:29:12: error: 'strcmp' was not declared in this scope
   29 |         if(strcmp(x.str.c_str(), y.str.c_str()) == 0) return x.point > y.point;
      |            ^~~~~~
a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <algorithm>
  +++ |+#include <cstring>
    5 |
Language: C++

#pragma GCC optimize "-O3"
#pragma GCC target ("avx")
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())
signed gcd(int a, int b){return b?gcd(b,a%b):a;}
signed lcm(int a, int b){return a*b/gcd(a,b);}

using namespace std;

const int mod=1e9+7;

void run();

void init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(12);
}

signed main(){
    init();
    run();
    return 0;
}

void run(){
    char in[120];
    pair<pair<string,int>,int> p[110];
    int a;
    cin >> a;
    rep(i,a)
    {
        int t;
        cin >> t;
        string tmp=in;
        p[i]=make_pair(make_pair(int,-t),i);
    }
    sort(p,p+a);
    rep(i,a)
    {
        cout << p[i].se+1 << endl;
    }
}


Compiler output:
a.cc: In function 'void run()':
a.cc:5:13: error: expected primary-expression before 'long'
    5 | #define int long long
      |             ^~~~
a.cc:51:34: note: in expansion of macro 'int'
   51 |         p[i]=make_pair(make_pair(int,-t),i);
      |                                  ^~~
Language: C++

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

int main() {
 int N;
 cin >> N;
 vector<tuple<string, int, int>> res(N);
 for(int i=0; i<N; i++) {
  string s;
  int p;
  cin >> s >> p;
  res.at(i) = make_tuple(s, p, i+1);
 }
  
 sort(res.begin(), res.end());
  
  for(int i=1; i<=N; i++) {
   cout << get<2>(res.at(N-i)) << endl;
  }
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;cin>>n;
  pair<string,int> r[n];
  map<int,int> p_i;
  for(i=0;i<n;i++){
    cin>>r[i].first>>r[i].second;r[i].second*=-1;
    p_i[r[i].second]=i+1;
  }
  sort(r,r+n);
  for(i=0;i<n;i++){cout<<p_i[r[i].second]<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<n;i++){
      |       ^
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   for(i=0;i<n;i++){cout<<p_i[r[i].second]<<endl;}
      |       ^
Language: C++

// ABC128B - Guidebook
// https://atcoder.jp/contests/abc128/tasks/abc128_b
void ABC128B() {

	int N;
	cin >> N;

	vector<pair<pair<string, int>,int>> G(N);

	for (int i = 0; i < N; i++)
	{
		G[i].second = i+1; //レストランの番号は1から始まる
		int tmp;
		cin >> G[i].first.first >> tmp;
		G[i].first.second = -tmp; //スコアは降順にしたいので-をかけておく
	}

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

	for (int i = 0; i < N; i++)
	{
		cout << G[i].second << endl;
	}
}



int main() {
	ABC128B();

	return 0;
}


Compiler output:
a.cc: In function 'void ABC128B()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> N;
      |         ^~~
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<pair<pair<string, int>,int>> G(N);
      |         ^~~~~~
a.cc:8:16: error: 'pair' was not declared in this scope
    8 |         vector<pair<pair<string, int>,int>> G(N);
      |                ^~~~
a.cc:8:26: error: 'string' was not declared in this scope
    8 |         vector<pair<pair<string, int>,int>> G(N);
      |                          ^~~~~~
a.cc:8:34: error: expected primary-expression before 'int'
    8 |         vector<pair<pair<string, int>,int>> G(N);
      |                                  ^~~
a.cc:12:17: error: 'G' was not declared in this scope
   12 |                 G[i].second = i+1; //レストランの番号は1から始まる
      |                 ^
a.cc:18:14: error: 'G' was not declared in this scope
   18 |         sort(G.begin(), G.end());
      |              ^
a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |         sort(G.begin(), G.end());
      |         ^~~~
      |         short
a.cc:22:17: error: 'cout' was not declared in this scope
   22 |                 cout << G[i].second << endl;
      |                 ^~~~
a.cc:22:40: error: 'endl' was not declared in this scope
   22 |                 cout << G[i].second << endl;
      |                                        ^~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  tuple<string, int, int> arr;
  for (int i = 0; i < N; i++) {
    string s;
    int t;
    cin >> s >> t;
    arr.push_back.make_tuple(s,-t,i);
  }
  sort(arr.begin(), arr.end());
  for (int i = 0; i < N; i++) {
    int pos;
    tie(ignore, ignore, pos) = arr.at(i);
    cout << pos+1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>' has no member named 'push_back'
   12 |     arr.push_back.make_tuple(s,-t,i);
      |         ^~~~~~~~~
a.cc:14:12: error: 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>' has no member named 'begin'
   14 |   sort(arr.begin(), arr.end());
      |            ^~~~~
a.cc:14:25: error: 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>' has no member named 'end'
   14 |   sort(arr.begin(), arr.end());
      |                         ^~~
a.cc:17:36: error: 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>' has no member named 'at'
   17 |     tie(ignore, ignore, pos) = arr.at(i);
      |                                    ^~
Language: C++

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

int main() {
  int N;
  cin >> N;
  pair<pair<string,int>, int> arr;
  for (int i = 0; i < N; i++) {
    string s;
    int t;
    cin >> s >> t;
    arr.push_back(make_pair(make_pair(s,-t),i));
  }
  sort(arr.begin(), arr.end());
  for (int i = 0; i < N; i++) {
    cout << arr.at(i).second << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'struct std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>' has no member named 'push_back'
   12 |     arr.push_back(make_pair(make_pair(s,-t),i));
      |         ^~~~~~~~~
a.cc:14:12: error: 'struct std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>' has no member named 'begin'
   14 |   sort(arr.begin(), arr.end());
      |            ^~~~~
a.cc:14:25: error: 'struct std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>' has no member named 'end'
   14 |   sort(arr.begin(), arr.end());
      |                         ^~~
a.cc:16:17: error: 'struct std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>' has no member named 'at'
   16 |     cout << arr.at(i).second << endl;
      |                 ^~
Language: C++

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

bool cmp(pair<pair<string,int>,int> a, pair<pair<string,int>,int> b)
{
  	if(a.first.first==b.first.first)
	return a..first.second>b..first.second;
  	return a.first.first>b.first.first;
}

int main()
{
	int n;
  	cin>>n;
  	vector<pair<pair<string,int>,int> > rec;
  	string name;
  	int rate;
  	for(int i=0 ; i<n ; ++i)
    {
    	cin>>name>>rate;
      	rec.push_back({{name,rate},i+1});
    }
  	sort(rec.begin(),rec.end(),cmp);
  	for(int i=0 ; i<n ; ++i)
    {
    	cout<<rec[i].second<<endl;
    }
  	return 0;
}


Compiler output:
a.cc: In function 'bool cmp(std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>, std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>)':
a.cc:7:18: error: expected unqualified-id before '.' token
    7 |         return a..first.second>b..first.second;
      |                  ^
a.cc:7:34: error: expected unqualified-id before '.' token
    7 |         return a..first.second>b..first.second;
      |                                  ^
Language: C++

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

bool cmp(pair<pair<string,int>,int> a, pair<pair<string,int>,int> b)
{
  	if(a.first.first==b.first.first)
	return a..first.second>b..first.second;
  	return a.first.first>b.first.first;
}

int main()
{
	int n;
  	cin>>n;
  	vector<pair<pair<string,int>,int> > rec;
  	string name;
  	int rate;
  	for(int i=0 ; i<n ; ++i)
    {
    	cin>>name>>rate;
      	rec.push_back({{name,rate},i+1});
    }
  	sort(rec.begin(),rec.end(),cmp);
  	for(int i=0 ; i<n ; ++i)
    {
    	cout<<rec[i].second;
    }
  	return 0;
}


Compiler output:
a.cc: In function 'bool cmp(std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>, std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>)':
a.cc:7:18: error: expected unqualified-id before '.' token
    7 |         return a..first.second>b..first.second;
      |                  ^
a.cc:7:34: error: expected unqualified-id before '.' token
    7 |         return a..first.second>b..first.second;
      |                                  ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<tuple<string, int, int>> x(N);
  for (int i = 1; i <= N; i++) {
    string s;
    int p;
    cin >> s >> p;
    x.push_back(tie(s, -p, i));
  }

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   12 |     x.push_back(tie(s, -p, i));
      |                        ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/tuple: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 <iostream>
#include <algorithm>
#include <vector>
#include <string>
#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 < name; i++) {
		cout << get<2>(a[i]) << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:29: error: 'name' was not declared in this scope; did you mean 'tzname'?
   28 |         for (int i = 0; i < name; i++) {
      |                             ^~~~
      |                             tzname
Language: C++

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

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 < name; i++) {
		cout << get<2>(a[i]) << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:29: error: 'name' was not declared in this scope; did you mean 'tzname'?
   27 |         for (int i = 0; i < name; i++) {
      |                             ^~~~
      |                             tzname
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >>N;
  vector<tuple<strings,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:6:16: error: 'strings' was not declared in this scope; did you mean 'stdin'?
    6 |   vector<tuple<strings,int,int>> a;
      |                ^~~~~~~
      |                stdin
a.cc:6:28: error: template argument 1 is invalid
    6 |   vector<tuple<strings,int,int>> a;
      |                            ^~~
a.cc:6:31: error: template argument 1 is invalid
    6 |   vector<tuple<strings,int,int>> a;
      |                               ^~
a.cc:6:31: error: template argument 2 is invalid
a.cc:12:7: error: request for member 'push_back' in 'a', which is of non-class type 'int'
   12 |     a.push_back(tie(s,p,i));
      |       ^~~~~~~~~
a.cc:15:10: error: request for member 'begin' in 'a', which is of non-class type 'int'
   15 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:15:20: error: request for member 'end' in 'a', which is of non-class type 'int'
   15 |   sort(a.begin(),a.end());
      |                    ^~~
a.cc:17:21: error: invalid types 'int[int]' for array subscript
   17 |     cout << get<2>(a[i]) <<endl;
      |                     ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
using namespace std;
typedef struct res{
	int index;
	string s;
	int p;

	bool operator < (const res& r) const{
		if(r.s == s) return p > r.p;
		else return s < r.s;
	}
}RESTAURANT;

int main(){
	int N;
	cin >> N;
	vector<RESTAURANT> restaurant(N);
	for(int i = 0; i < N; i++){
		cin >> restaurant[i].s >> restaurant[i].p;
		restaurant[i].index = i+1;
	}
	sort(restaurant.begin(), restaurant.end());
	for(int i = 0; i < N; i++) cout << restaurant[i].index << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   24 |         sort(restaurant.begin(), restaurant.end());
      |         ^~~~
      |         short
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

typedef pair<pair<string , int>, int> p[110];

int main()
{
	int a; cin >> a;
	for (int i = 0; i < a; i++)
	{
		int t; cin >> t;
		string tmp; cin >> tmp;
		
		p[i] = make_pair(make_pair(int, -t), i);
	}
	sort(p,p+a);
	for (int i = 0; i < a; i++) {
		printf("%d\n", p[i].second+1);
		cout << p[i].second+1 << endl;
	}
	
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: structured binding declaration cannot have type 'p' {aka 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [110]'}
   19 |                 p[i] = make_pair(make_pair(int, -t), i);
      |                  ^~~
a.cc:19:18: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:19:19: error: redeclaration of 'auto i'
   19 |                 p[i] = make_pair(make_pair(int, -t), i);
      |                   ^
a.cc:14:18: note: 'int i' previously declared here
   14 |         for (int i = 0; i < a; i++)
      |                  ^
a.cc:19:44: error: expected primary-expression before 'int'
   19 |                 p[i] = make_pair(make_pair(int, -t), i);
      |                                            ^~~
a.cc:19:54: error: use of 'i' before deduction of 'auto'
   19 |                 p[i] = make_pair(make_pair(int, -t), i);
      |                                                      ^
a.cc:21:15: error: expected primary-expression before ',' token
   21 |         sort(p,p+a);
      |               ^
a.cc:21:17: error: expected primary-expression before '+' token
   21 |         sort(p,p+a);
      |                 ^
a.cc:23:33: error: expected primary-expression before '[' token
   23 |                 printf("%d\n", p[i].second+1);
      |                                 ^
a.cc:24:26: error: expected primary-expression before '[' token
   24 |                 cout << p[i].second+1 << endl;
      |                          ^
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

typedef pair<pair<string , int>, int> p[110]

int main()
{
	int a; cin >> a;
	for (int i = 0; i < a; i++)
	{
		int t; cin >> t;
		string tmp; cin >> tmp;
		
		p[i] = make_pair(make_pair(int, -t), i);
	}
	sort(p,p+a);
	for (int i = 0; i < a; i++) {
		printf("%d\n", p[i].second+1);
		cout << p[i].second+1 << endl;
	}
	
	return 0;
} 

Compiler output:
a.cc:11:1: error: expected initializer before 'int'
   11 | int main()
      | ^~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

typedef pair<pair<string , int>, int> p[110]

int main()
{
	int a; cin >> a;
	for (int i = 0; i < a; i++)
	{
		int t; cin >> t;
		string tmp; cin >> tmp;
		
		p[i] = make_pair(make_pair(int, -t), i);
	}
	sort(p,p+a);
	for (int i = 0; i < a; i++) {
		printf("%d\n", p[i].second+1);
		cout << p[i].second+1 << endl;
	}
} 

Compiler output:
a.cc:11:1: error: expected initializer before 'int'
   11 | int main()
      | ^~~