criyle/codenet-compile-errors huggingface dataset:
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=100-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:14:20: error: 'std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >::iterator' has no member named 'a'
   14 |     sort(a.begin().a.end());
      |                    ^
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,x) for(int i=0;i<x;i++)
#define put(ans)    cout << ans << endl;
#define reverse(s) reverse(s.begin(),s.end())

//最大公約数
ll gcd(ll a, ll b) {
    return b ? gcd(b, a%b) : a;
}
//最小公倍数
ll lcm(ll a, ll b) {
    return a / gcd(a, b) * b;
}
bool isPrime(int x){
    ll i;
    if(x < 2)return 0;
    else if(x == 2) return 1;
    if(x%2 == 0) return 0;
    for(i = 3; i*i <= x; i += 2) if(x%i == 0) return 0;
    return 1;
}

int main(){
    int n;
    cin >> n;
    pair<pair<string ,int>,int> r[n];
    rep(i,n){
        string s;   int p;
        cin >> s >> p;
        r[i] = make_pair(make_pair(s,-p),i);
    }

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

    rep(i,n){
        cout << r[i].second+1 << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:12: error: request for member 'begin' in 'r', which is of non-class type 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [n]'
   35 |     sort(r.begin(),r.end());
      |            ^~~~~
a.cc:35:22: error: request for member 'end' in 'r', which is of non-class type 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [n]'
   35 |     sort(r.begin(),r.end());
      |                      ^~~
Language: C++

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

using namespace std;

#define ALL(x) begin(x), end(x)

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

  vector<tuple<string, int, int>> r;
  string s;
  int p;
  for (int i = 0; i < N; i++) {
    cin >> s >> p;
    r.emplace_back(s, -p, i + 1);
  }
  sort(ALL(r));

  for (auto &x : r) {
    cout << get<2>(x) << endl;
  }

  return 0;
}


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

#include <iostream>
#include <tuple>
#include <utility>
#include <vector>

using namespace std;
using ll = long long;
using ld = long double;

#define ALL(x) begin(x), end(x)

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

  vector<tuple<string, int, int>> r;
  string s;
  int p;
  for (int i = 0; i < N; i++) {
    cin >> s >> p;
    r.emplace_back(s, -p, i + 1);
  }
  sort(ALL(r));

  for (auto &x : r) {
    cout << get<2>(x) << endl;
  }

  return 0;
}


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

#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define endl "\n"
#define speed() ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define sz(x) (int)(x).size()
#define _USE_MATH_DEFINES
using namespace std;
typedef long long int lli;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

int main() {
    speed();
    int N; cin >> N;
    map<string, int> m;
    rep(i, 0, N) {
        string names; int points;
        cin >> names; cin >> points;
        m[names] = points;
    }
    trav(a, m) sort(all(a.second), greater<>());
    trav(a, m) {
        for (auto& i : a.second) cout << i.second << endl
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:18: error: request for member 'begin' in 'a.std::pair<const std::__cxx11::basic_string<char>, int>::second', which is of non-class type 'int'
    4 | #define all(x) x.begin(), x.end()
      |                  ^~~~~
a.cc:24:21: note: in expansion of macro 'all'
   24 |     trav(a, m) sort(all(a.second), greater<>());
      |                     ^~~
a.cc:4:29: error: request for member 'end' in 'a.std::pair<const std::__cxx11::basic_string<char>, int>::second', which is of non-class type 'int'
    4 | #define all(x) x.begin(), x.end()
      |                             ^~~
a.cc:24:21: note: in expansion of macro 'all'
   24 |     trav(a, m) sort(all(a.second), greater<>());
      |                     ^~~
a.cc:26:26: error: 'begin' was not declared in this scope
   26 |         for (auto& i : a.second) cout << i.second << endl
      |                          ^~~~~~
a.cc:26:26: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:26:26: error: 'end' was not declared in this scope
   26 |         for (auto& i : a.second) cout << i.second << endl
      |                          ^~~~~~
a.cc:26:26: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;


int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<tuple<string, int, int>> v;
    for (int i = 0; i < n; ++i)
    {
        string s; int p;
        cin >> s >> p;
        v.emplace_back(s, -p, i + 1);
    }
    sort(v.begin(), v.end());
    for (auto t : v)
    {
        string s; int p, int j;
        tie(s,p,j) = t;
        cout << j << '\n';
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:26: error: expected unqualified-id before 'int'
   23 |         string s; int p, int j;
      |                          ^~~
a.cc:24:17: error: 'j' was not declared in this scope
   24 |         tie(s,p,j) = t;
      |                 ^
Language: C++

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

int main()
{
     int n;
     cin>>n;
  
   vector<tuple<string,int,int>>resu(n);
  
   for(int i=1;i<n;i++)
   { 
       string name;
       int tensuu;
   
      cin>>name>>tensuu;
      tensuu=-tensuu;
     
      rest.at(i) = make_tuple(name,tensuu,i);
   }
     sort(rest.begin(),rest.end());
  
  for(auto x:rest)
  {
      int id;
    
    tie(ignore,ignore,id) = x;
    
    cout<<id<<endl;
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'rest' was not declared in this scope; did you mean 'resu'?
   19 |       rest.at(i) = make_tuple(name,tensuu,i);
      |       ^~~~
      |       resu
a.cc:21:11: error: 'rest' was not declared in this scope; did you mean 'resu'?
   21 |      sort(rest.begin(),rest.end());
      |           ^~~~
      |           resu
Language: C++

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

int main()
{
     int n;
     cin>>n;
  
   vector<tuple<string,int,int>>rest(n);
  
   for(int i=1;i<n;i++)
   { 
       string name;
       int tensuu;
   
      cin>>name>>tensuu;
      tensuu=-tensuu;
     
      rest.at(i) = make_tuple(name,tensuu,i);
   }
     sort(rest.begin(),rest.end());
  
  for(auto x:rest)
  {
      int id;
    
    tie(ignore,ignore,id) = x;
    
    cout<<id<<endl:
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:19: error: expected ';' before ':' token
   29 |     cout<<id<<endl:
      |                   ^
      |                   ;
Language: C++

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

int main()
{
     int n;
     cin>>n;
  
   vector<tuple<string,int,int>>resu(n);
  
   for(int i=1;i<n;i++)
   { 
       string name;
       int tensuu;
   
      cin>>name>>tensuu;
      tensuu=-tensuu;
     
      rest.at(i) = make_tuple(name,tensuu,i);
   }
     sort(rest.begin(),rest.end());
  
  for(auto x:rest)
  {
      int id;
    
    tie(ignore,ignore,id) = x;
    
    cout<<id<<endl:
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'rest' was not declared in this scope; did you mean 'resu'?
   19 |       rest.at(i) = make_tuple(name,tensuu,i);
      |       ^~~~
      |       resu
a.cc:21:11: error: 'rest' was not declared in this scope; did you mean 'resu'?
   21 |      sort(rest.begin(),rest.end());
      |           ^~~~
      |           resu
a.cc:29:19: error: expected ';' before ':' token
   29 |     cout<<id<<endl:
      |                   ^
      |                   ;
Language: C++

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

int main() {
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: In function 'int main()':
a.cc:7:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    7 | int main(){
      |         ^~
a.cc:7:9: note: remove parentheses to default-initialize a variable
    7 | int main(){
      |         ^~
      |         --
a.cc:7:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:7:11: error: a function-definition is not allowed here before '{' token
    7 | int main(){
      |           ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
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:9: error: 'scanf' was not declared in this scope
    4 |   int a;scanf("%d",&a);
      |         ^~~~~
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string tmp=in;
      |     ^~~~~~
a.cc:8:5: error: 'p' was not declared in this scope
    8 |     p[i]=make_pair(make_pair(in,-t),i);
      |     ^
a.cc:8:20: error: 'make_pair' was not declared in this scope
    8 |     p[i]=make_pair(make_pair(in,-t),i);
      |                    ^~~~~~~~~
a.cc:8:10: error: 'make_pair' was not declared in this scope
    8 |     p[i]=make_pair(make_pair(in,-t),i);
      |          ^~~~~~~~~
a.cc:10:8: error: 'sort' is not a member of 'std'
   10 |   std::sort(p,p+a);
      |        ^~~~
a.cc:10:13: error: 'p' was not declared in this scope
   10 |   std::sort(p,p+a);
      |             ^
a.cc:11:23: 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++

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:9: error: 'scanf' was not declared in this scope
    4 |   int a;scanf("%d",&a);
      |         ^~~~~
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string tmp=in;
      |     ^~~~~~
a.cc:8:5: error: 'p' was not declared in this scope
    8 |     p[i]=make_pair(make_pair(in,-t),i);
      |     ^
a.cc:8:20: error: 'make_pair' was not declared in this scope
    8 |     p[i]=make_pair(make_pair(in,-t),i);
      |                    ^~~~~~~~~
a.cc:8:10: error: 'make_pair' was not declared in this scope
    8 |     p[i]=make_pair(make_pair(in,-t),i);
      |          ^~~~~~~~~
a.cc:10:8: error: 'sort' is not a member of 'std'
   10 |   std::sort(p,p+a);
      |        ^~~~
a.cc:10:13: error: 'p' was not declared in this scope
   10 |   std::sort(p,p+a);
      |             ^
a.cc:11:23: 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];
a.cc:11:52: error: expected '}' at end of input
   11 |   for(int i=0;i<a;i++)printf("%d\n",p[i].second+1);
      |                                                    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
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(make_tuple(s,p,i));
  }
  
  sort(a.begin(),a.end());
 
for(int i=1;i<=n;i++)
    {
        cout<<get<2>(a.at[i])<<endl;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:26: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   23 |         cout<<get<2>(a.at[i])<<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.at(i)=make_tuple(s,p,i)
  }
  
  sort(a.begin(),a.end());
 
for(int i=1;i<=n;i++)
    {
        cout<<get<2>(a.at[i])<<endl;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:30: error: expected ';' before '}' token
   16 |     a.at(i)=make_tuple(s,p,i)
      |                              ^
      |                              ;
   17 |   }
      |   ~                           
a.cc:23:26: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   23 |         cout<<get<2>(a.at[i])<<endl;
      |                          ^
Language: C

#include <stdio.h>
#include <stdlib.h>

int lex_smaller(char* s1, char* s2)
{
	int i;
	for (i = 0; s1[i] != 0 && s2[i] != 0; i++) {
		if (s1[i] < s2[i]) return 1;
		else if (s1[i] > s2[i]) return -1;
	}
	if (s1[i] == s2[i]) return 0;
	else if (s1[i] == 0) return 1;
	else return -1;
}

void push(char* s, char** heap, int* n)
{
	int i = *n;
	char *tmp;
	heap[(*n)++] = s;
	while (1) {
		if (i == 0) break;
		else if (lex_smaller(heap[i], heap[(i - 1) / 2]) == 1) {
			tmp = heap[(i - 1) / 2];
			heap[(i - 1) / 2] = heap[i];
			heap[i] = tmp;
			i = (i - 1) / 2;
		} else break;
	}
}

char* pop(char** heap, int* n)
{
	int i = 0, j;
	char *tmp, *output = heap[0];
	heap[0] = heap[--(*n)];
	while (1) {
		if (i * 2 + 1 >= *n) break;
		else if (i * 2 + 2 >= *n) j = i * 2 + 1;
		else if (lex_smaller(heap[i * 2 + 1], heap[i * 2 + 2]) == 1) j = i * 2 + 1;
		else j = i * 2 + 2;
		if (lex_smaller(heap[j], heap[i]) == 1) {
			tmp = heap[j];
			heap[j] = heap[i];
			heap[i] = tmp;
			i = j;
		} else break;
	}
	return output;
}

int main()
{
	int i, N, P[11];
	char S[101][11];
	scanf("%d", &N);
	for (i = 1; i <= N; i++) scanf("%s %d", S[i], &(P[i]));
	
	int j, n, city[101] = {};
	for (i = 1, n = 0; i <= N; i++) {
		for (j = 1; j < i; j++) {
			if (lex_smaller(S[i], S[j]) == 0) break;
		}
		if (j == i) city[n++] = i;
	}
	
	int flag[101] = {}, max, argmax;
	char *tmp, **heap = (char**)malloc(sizeof(char*) * n);
	for (i = 0; i < n; i++) push(S[city[i]], heap, &m);
	while (m > 0) {
		tmp = pop(heap, &m);
		while (1) {
			max = -1;
			for (i = 1; i <= N; i++) {
				if (flag == 0 && P[i] > max && lex_smaller(tmp, S[i]) == 0) {
					max = P[i];
					argmax = i;
				}
			}
			if (i > N) break;
			else {
				printf("%d\n", argmax);
				flag[argmax] = 1;
			}
		}
	}
	
	fflush(stdout);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:69:57: error: 'm' undeclared (first use in this function)
   69 |         for (i = 0; i < n; i++) push(S[city[i]], heap, &m);
      |                                                         ^
main.c:69:57: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <stdlib.h>

int lex_smaller(char* s1, char* s2)
{
	int i;
	for (i = 0; s1[i] != 0 && s2[i] != 0; i++) {
		if (s1[i] < s2[i]) return 1;
		else if (s1[i] > s2[i]) return -1;
	}
	if (s1[i] == s2[i]) return 0;
	else if (s1[i] == 0) return 1;
	else return -1;
}

void push(char* s, char** heap, int* n)
{
	int i = *n;
	char *tmp;
	heap[(*n)++] = s;
	while (1) {
		if (i == 0) break;
		else if (lex_smaller(heap[i], heap[(i - 1) / 2]) == 1) {
			tmp = heap[(i - 1) / 2];
			heap[(i - 1) / 2] = heap[i];
			heap[i] = tmp;
			i = (i - 1) / 2;
		} else break;
	}
}

char* pop(char** heap, int* n)
{
	int i = 0, j;
	char *tmp, *output = heap[0];
	heap[0] = heap[--(*n)];
	while (1) {
		if (i * 2 + 1 >= *n) break;
		else if (i * 2 + 2 >= *n) j = i * 2 + 1;
		else if (lex_smaller(heap[i * 2 + 1], heap[i * 2 + 2]) == 1) j = i * 2 + 1;
		else j = i * 2 + 2;
		if (lex_smaller(heap[j], heap[i]) == 1) {
			tmp = heap[j];
			heap[j] = heap[i];
			heap[i] = tmp;
			i = j;
		} else break;
	}
	return output;
}

int main()
{
	int i, N, P[11];
	char S[101][11];
	scanf("%d", &N);
	for (i = 1; i <= N; i++) scanf("%s %d", S[i], &(P[i]));
	
	int j, n, city[101] = {};
	for (i = 1, n = 0; i <= N; i++) {
		for (j = 1; j < i; j++) {
			if (lex_smaller(S[i], S[j]) == 0) break;
		}
		if (j == i) city[n++] = i;
	}
	
	int flag[101] = {}, max, argmax;
	char *tmp, **heap = (char**)malloc(sizeof(char*) * n);
	for (i = 0; i < n; i++) push(S[type[argmax[i]]], heap, &m);
	while (m > 0) {
		tmp = pop(heap, &m);
		while (1) {
			max = -1;
			for (i = 1; i <= N; i++) {
				if (flag == 0 && P[i] > max && lex_smaller(tmp, S[i]) == 0) {
					max = P[i];
					argmax = i;
				}
			}
			if (i > N) break;
			else {
				printf("%d\n", argmax);
				flag[argmax] = 1;
			}
		}
	}
	
	fflush(stdout);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:69:40: error: 'type' undeclared (first use in this function)
   69 |         for (i = 0; i < n; i++) push(S[type[argmax[i]]], heap, &m);
      |                                        ^~~~
main.c:69:40: note: each undeclared identifier is reported only once for each function it appears in
main.c:69:51: error: subscripted value is neither array nor pointer nor vector
   69 |         for (i = 0; i < n; i++) push(S[type[argmax[i]]], heap, &m);
      |                                                   ^
main.c:69:65: error: 'm' undeclared (first use in this function)
   69 |         for (i = 0; i < n; i++) push(S[type[argmax[i]]], heap, &m);
      |                                                                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[n];
  string s[n];
  for(int i=0;i<n;i++){
    cin >> s[i] >> a[i];
  }
  int tmp;
  string tmp2;
  int c[n];
  for(int i=0;i<n;i++)c[i]=i+1;
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      if(a[i]<a[j]){
        tmp=a[i];
        a[i]=a[j];
        a[j]=tmp;
        tmp2=s[i];
        s[i]=s[j];
        s[j]=tmp2;
        tmp=s[j];
        c[j]=c[i];
        c[i]=tmp;
        
      }
    }
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      if(a[i]==a[j]&&s[i]>s[j]){
        tmp2=s[i];
        s[i]=s[j];
        s[j]=tmp2;
        tmp=c[i];
        c[i]=c[j];
        c[j]=tmp;
      }
    }
  }
  for(int i=0;i<n;i++)cout << c[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
   24 |         tmp=s[j];
      |             ~~~^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <map>
typedef pair<string, int> P;
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<P> g(n);
  map<P, int> m;
  for(int i = 0; i < n; i++){
    string s;
    int score;
    cin >> s >> score;
    g[i] = P(s, score);
    m[g[i]] = i + 1;
  }
  sort(g.begin(), g.end());
  for(int i = 0; i < n; i++){
    cout << m[g[i]] << endl;
  }
}

Compiler output:
a.cc:7:9: error: 'pair' does not name a type
    7 | typedef pair<string, int> P;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:12:10: error: 'P' was not declared in this scope
   12 |   vector<P> g(n);
      |          ^
a.cc:12:11: error: template argument 1 is invalid
   12 |   vector<P> g(n);
      |           ^
a.cc:12:11: error: template argument 2 is invalid
a.cc:13:13: error: template argument 3 is invalid
   13 |   map<P, int> m;
      |             ^
a.cc:13:13: error: template argument 4 is invalid
a.cc:18:6: error: invalid types 'int[int]' for array subscript
   18 |     g[i] = P(s, score);
      |      ^
a.cc:19:8: error: invalid types 'int[int]' for array subscript
   19 |     m[g[i]] = i + 1;
      |        ^
a.cc:21:10: error: request for member 'begin' in 'g', which is of non-class type 'int'
   21 |   sort(g.begin(), g.end());
      |          ^~~~~
a.cc:21:21: error: request for member 'end' in 'g', which is of non-class type 'int'
   21 |   sort(g.begin(), g.end());
      |                     ^~~
a.cc:23:16: error: invalid types 'int[int]' for array subscript
   23 |     cout << m[g[i]] << endl;
      |                ^
Language: C++

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <map>
typedef pair<string, int> P;
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<P> g(n);
  map<P, int> m;
  for(int i = 0; i < n; i++){
    string s;
    int score;
    cin >> s >> score;
    g[i] = P(s, score);
    m[g[i]] = i + 1;
  }
  sort(g.begin(), g.end());
  for(int i = 0; i < n; i++){
    cout << map[g[i]] << endl;
  }
}

Compiler output:
a.cc:7:9: error: 'pair' does not name a type
    7 | typedef pair<string, int> P;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:12:10: error: 'P' was not declared in this scope
   12 |   vector<P> g(n);
      |          ^
a.cc:12:11: error: template argument 1 is invalid
   12 |   vector<P> g(n);
      |           ^
a.cc:12:11: error: template argument 2 is invalid
a.cc:13:13: error: template argument 3 is invalid
   13 |   map<P, int> m;
      |             ^
a.cc:13:13: error: template argument 4 is invalid
a.cc:18:6: error: invalid types 'int[int]' for array subscript
   18 |     g[i] = P(s, score);
      |      ^
a.cc:19:8: error: invalid types 'int[int]' for array subscript
   19 |     m[g[i]] = i + 1;
      |        ^
a.cc:21:10: error: request for member 'begin' in 'g', which is of non-class type 'int'
   21 |   sort(g.begin(), g.end());
      |          ^~~~~
a.cc:21:21: error: request for member 'end' in 'g', which is of non-class type 'int'
   21 |   sort(g.begin(), g.end());
      |                     ^~~
a.cc:23:16: error: missing template arguments before '[' token
   23 |     cout << map[g[i]] << endl;
      |                ^
a.cc:23:18: error: invalid types 'int[int]' for array subscript
   23 |     cout << map[g[i]] << endl;
      |                  ^
Language: C++

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <map>
typedef pair<string, int> P;
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<P> g(n);
  map<P, int> m;
  for(int i = 0; i < n; i++){
    string s;
    int score;
    cin >> s >> score;
    g[i] = P(s, score);
    m[g[i]] = i + 1;
  }
  sort(g.begin(), g.end());
  for(int i = 0; i < n; i++){
    cout << map[g[i]] << endl;
}

Compiler output:
a.cc:7:9: error: 'pair' does not name a type
    7 | typedef pair<string, int> P;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:12:10: error: 'P' was not declared in this scope
   12 |   vector<P> g(n);
      |          ^
a.cc:12:11: error: template argument 1 is invalid
   12 |   vector<P> g(n);
      |           ^
a.cc:12:11: error: template argument 2 is invalid
a.cc:13:13: error: template argument 3 is invalid
   13 |   map<P, int> m;
      |             ^
a.cc:13:13: error: template argument 4 is invalid
a.cc:18:6: error: invalid types 'int[int]' for array subscript
   18 |     g[i] = P(s, score);
      |      ^
a.cc:19:8: error: invalid types 'int[int]' for array subscript
   19 |     m[g[i]] = i + 1;
      |        ^
a.cc:21:10: error: request for member 'begin' in 'g', which is of non-class type 'int'
   21 |   sort(g.begin(), g.end());
      |          ^~~~~
a.cc:21:21: error: request for member 'end' in 'g', which is of non-class type 'int'
   21 |   sort(g.begin(), g.end());
      |                     ^~~
a.cc:23:16: error: missing template arguments before '[' token
   23 |     cout << map[g[i]] << endl;
      |                ^
a.cc:23:18: error: invalid types 'int[int]' for array subscript
   23 |     cout << map[g[i]] << endl;
      |                  ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:9:11: note: to match this '{'
    9 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  int n;
  cin>>n;
  vector<int>p(n);
  vector<string>s(n);
  rep(i,n) {
    cin>>s[i]>>p[i];
    p[i]--;
  }
  vector<pair<string,int>>mp;
  rep(i,n){
    mp.push_back(make_pair(s[i],p[i]));
  }
  sort(all(mp));
  rep(i,n-1){
    if(mp[i].first==mp[i+1].first && mp[i].second<mp[i+1].second){
      int tmp=mp[i].second;
      mp[i].second=mp[i+1].second;
      mp[i+1].second=tmp;
    }
  rep(i,n){
    cout<<mp[i].second+1<<endl;
  }
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  int n;
  cin>>n;
  vector<int>p(n);
  vector<string>s(n);
  rep(i,n) cin>>s[i]>>p[i];
  vector<pair<string,int>>mp;
  rep(i,n){
    mp.push_back(make_pair(s[i],p[i]);
  }
  sort(rall(mp));
  rep(i,n-1){
    if(mp[i].second<mp[i+1].second){
      
  sort(all(mp));
  rep(i,n){
    cout<<mp[i].second+1<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:38: error: expected ')' before ';' token
   23 |     mp.push_back(make_pair(s[i],p[i]);
      |                 ~                    ^
      |                                      )
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:26:13: note: to match this '{'
   26 |   rep(i,n-1){
      |             ^
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:15:17: note: to match this '{'
   15 | int main()      {
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  int n;
  cin>>n;
  vector<int>p(n);
  vector<string>s(n);
  rep(i,n) cin>>s[i]>>p[i];
  vector<pair<string,int>>mp;
  rep(i,n)rep(j,n){
    mp.push_back(make_pair(s[i],p[i]);
  }
  sort(rall(mp));
  rep(i,n){
    cout<<mp[i].second<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:38: error: expected ')' before ';' token
   23 |     mp.push_back(make_pair(s[i],p[i]);
      |                 ~                    ^
      |                                      )
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  int n;
  cin>>n;
  vector<int>p(n);
  vector<string>s(n);
  rep(i,n) cin>>s[i]>>p[i];
  vector<pair<string,int>>mp;
  rep(i,n)rep(j,n){
    mp.push_back(make_pair(s[i],p[i]);
  }
  sort(rall(mp));
  rep(i,n){
    cout<<mp.second<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:38: error: expected ')' before ';' token
   23 |     mp.push_back(make_pair(s[i],p[i]);
      |                 ~                    ^
      |                                      )
a.cc:27:14: error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int> >' has no member named 'second'
   27 |     cout<<mp.second<<endl;
      |              ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  int n;
  cin>>n;
  vector<int>p(n);
  vector<string>s(n);
  rep(i,n) cin>>s[i]>>p[i];
  vector<pair<string,int>>mp;
  rep(i,n)rep(j,n){
    mp.push_back(make_pair(s[i],p[i]);
  }
  sort(rall(mp));
  rep(i,n){
    get<i>(int);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:38: error: expected ')' before ';' token
   23 |     mp.push_back(make_pair(s[i],p[i]);
      |                 ~                    ^
      |                                      )
a.cc:27:12: error: expected primary-expression before 'int'
   27 |     get<i>(int);
      |            ^~~
Language: C++

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

int main() {
  int N; cin >> N;
  vector<pair<pair<string, int>, int>> rst(N);
  for (int i=0; i<N; i++) {
    string s; int p; cin >> s >> p;
    rst[i] = make_pair(make_pair(s, -p), i+1);
  }
  sort(rst.begin(), rst.end());
  for (int i=0; i<N; i++) {
    printf("%d\n", a[i].second+1);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: 'a' was not declared in this scope
   13 |     printf("%d\n", a[i].second+1);
      |                    ^
Language: C++

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

int main() {
  int N; cin >> N;
  vector<pair<pair<string, int>, int>> rst(N);
  for (int i=0; i<N; i++) {
    string s; int p; cin >> s >> p;
    rst[i] = make_pair(make_pair(s, -p), i+1);
  }
  sort(rst.begin(), rst.end());
  for (int i=0; i<N; i++) {
    string s; int p, n;
    tie(tie(s, p), n) = rst[i];
    cout << n << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: cannot bind non-const lvalue reference of type 'std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int&>&' to an rvalue of type 'std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int&>'
   14 |     tie(tie(s, p), n) = rst[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 1 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {tuple<__cxx11::basic_string<char, char_traits<char>, allocator<char> >&, int&>, int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
Language: C++

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

int main() {
  int N; cin >> N;
  vector<pair<oair<string, int>, int>> rst(N);
  for (int i=0; i<N; i++) {
    string s; int p; cin >> s >> p;
    rst[i] = make_pair(make_pair(s, -p), i+1);
  }
  sort(rst.begin(), rst.end());
  for (int i=0; i<N; i++) {
    string s; int p, n;
    tie(tie(s, p), n) = rst[i];
    cout << n << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'oair' was not declared in this scope
    6 |   vector<pair<oair<string, int>, int>> rst(N);
      |               ^~~~
a.cc:6:31: error: template argument 1 is invalid
    6 |   vector<pair<oair<string, int>, int>> rst(N);
      |                               ^
a.cc:6:34: error: template argument 1 is invalid
    6 |   vector<pair<oair<string, int>, int>> rst(N);
      |                                  ^~~
a.cc:6:37: error: expected unqualified-id before '>' token
    6 |   vector<pair<oair<string, int>, int>> rst(N);
      |                                     ^~
a.cc:9:5: error: 'rst' was not declared in this scope
    9 |     rst[i] = make_pair(make_pair(s, -p), i+1);
      |     ^~~
a.cc:11:8: error: 'rst' was not declared in this scope
   11 |   sort(rst.begin(), rst.end());
      |        ^~~
a.cc:14:12: error: cannot bind non-const lvalue reference of type 'std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int&>&' to an rvalue of type 'std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int&>'
   14 |     tie(tie(s, p), n) = rst[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 1 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {tuple<__cxx11::basic_string<char, char_traits<char>, allocator<char> >&, int&>, int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
Language: C++

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

int main() {
  int N; cin >> N;
  vector<pair<<string, int>, int>> rst(N);
  for (int i=0; i<N; i++) {
    string s; int p; cin >> s >> p;
    rst[i] = make_pair((s, p*(-1)), i+1);
  }
  sort(rst.begin(), rst.end());
  for (int i=0; i<N; i++) {
    string s; int p;
    tie((s, p), i+1) = rst[i];
    cout << i+1 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:27: error: template argument 1 is invalid
    6 |   vector<pair<<string, int>, int>> rst(N);
      |                           ^
a.cc:6:27: error: template argument 2 is invalid
a.cc:6:28: error: expected unqualified-id before ',' token
    6 |   vector<pair<<string, int>, int>> rst(N);
      |                            ^
a.cc:6:30: error: expected unqualified-id before 'int'
    6 |   vector<pair<<string, int>, int>> rst(N);
      |                              ^~~
a.cc:9:5: error: 'rst' was not declared in this scope
    9 |     rst[i] = make_pair((s, p*(-1)), i+1);
      |     ^~~
a.cc:11:8: error: 'rst' was not declared in this scope
   11 |   sort(rst.begin(), rst.end());
      |        ^~~
a.cc:14:18: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   14 |     tie((s, p), i+1) = rst[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 = {int, int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
a.cc:15:25: error: expected '}' at end of input
   15 |     cout << i+1 << endl;
      |                         ^
a.cc:12:27: note: to match this '{'
   12 |   for (int i=0; i<N; i++) {
      |                           ^
a.cc:15:25: error: expected '}' at end of input
   15 |     cout << i+1 << endl;
      |                         ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);       
		int n = sc.nextInt();
		int [] in = new int [n];
        String [] str = new String [n];
        int [] ans = new int [n];
        for(int i=0;i<n;i++){str[i] = sc.next();
                             in[i] = sc.nextInt();
                            }	
        for(int i=0;i<n;i++){int count = 0;
                             for(int j=0;j<n;j++){
          if((str[i]).compareTo(str[j])>0||(str[i].equals(str[j])&&in[i]<in[j]))
                                                 {count++;}                                                          
                                                 }                   
                             b[ans]=i+1; 
                            }
	for(int i=0;i<n;i++){System.out.println(ans[i]);}
  }
}

Compiler output:
Main.java:17: error: cannot find symbol
                             b[ans]=i+1; 
                             ^
  symbol:   variable b
  location: class Main
Main.java:17: error: incompatible types: int[] cannot be converted to int
                             b[ans]=i+1; 
                               ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] in = new int [a];
        String [] str = new String [a];
        for(int i=0;i<a;i++){str[i] = sc.next();
                             in[i] = sc.nextInt();
                            }		
        for(int i=0;i<a;i++){int ans = 1;for(int j=0;j<a;j++){
          if(str[i]>str[j]||(str[i].equals(str[j])&&in[i]<in[j])){ans++;}}
                             System.out.println(ans);}
			}
}

Compiler output:
Main.java:12: error: bad operand types for binary operator '>'
          if(str[i]>str[j]||(str[i].equals(str[j])&&in[i]<in[j])){ans++;}}
                   ^
  first type:  String
  second type: String
1 error
Language: C++

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

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

Compiler output:
a.cc:5:6: error: two or more data types in declaration of 'type name'
    5 | pair<pair<string ,int>int> pa[110];
      |      ^~~~~~~~~~~~~~~~~
a.cc:5:26: error: wrong number of template arguments (1, should be 2)
    5 | pair<pair<string ,int>int> pa[110];
      |                          ^
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: In function 'int main()':
a.cc:13:20: error: cannot convert 'std::pair<std::pair<char*, int>, int>' to 'int' in assignment
   13 |     pa[i]=make_pair(make_pair(s,-p),i);
      |           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                    |
      |                    std::pair<std::pair<char*, int>, int>
a.cc:16:23: error: request for member 'second' in 'pa[i]', which is of non-class type 'int'
   16 |     printf("%d",pa[i].second+1);
      |                       ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define REP(i,n) for(int i=0; i<(n); i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define ALL(n) begin(n),end(n)
#define IN(a, x, b) (a<=x && x<b)
#define INIT std::ios::sync_with_stdio(false);std::cin.tie(0);
template<class T> inline T CHMAX(T & a, const T b) { return a = (a < b) ? b : a; }
template<class T> inline T CHMIN(T & a, const T b) { return a = (a > b) ? b : a; }

const long double EPS = 1e-10;
const long long INF = 1e18;
const long double PI = acos(-1.0L);
/*
int main()
{
    INIT;
    char in[120];
    int n;
    cin >> n;
    pair<pair<string, int>, int> p[110];
    REP(i,n){
        int t; scanf("%s%d",in,&t);
        string tmp=in;
        p[i] = make_pair(make_pair(in, -t),i);
    }
    sort(p, p+n);
    REP(i,n) printf("%d\n", p[i].second+1);
    return 0;
}*/

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_pain(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:44:14: error: 'make_pain' was not declared in this scope
   44 |         p[i]=make_pain(make_pair(in,-t),i);
      |              ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define REP(i,n) for(int i=0; i<(n); i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define ALL(n) begin(n),end(n)
#define IN(a, x, b) (a<=x && x<b)
#define INIT std::ios::sync_with_stdio(false);std::cin.tie(0);
template<class T> inline T CHMAX(T & a, const T b) { return a = (a < b) ? b : a; }
template<class T> inline T CHMIN(T & a, const T b) { return a = (a > b) ? b : a; }

const long double EPS = 1e-10;
const long long INF = 1e18;
const long double PI = acos(-1.0L);
/*
int main()
{
    INIT;
    char in[120];
    int n;
    cin >> n;
    pair<pair<string, int>, int> p[110];
    REP(i,n){
        int t; scanf("%s%d",in,&t);
        string tmp=in;
        p[i] = make_pair(make_pair(in, -t),i);
    }
    sort(p, p+n);
    REP(i,n) printf("%d\n", p[i].second+1);
    return 0;
}*/

char in[120];
pair<pair<string, 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_painr(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:37:22: error: wrong number of template arguments (1, should be 2)
   37 | pair<pair<string, int>> p[110];
      |                      ^~
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: In function 'int main()':
a.cc:44:14: error: 'make_painr' was not declared in this scope
   44 |         p[i]=make_painr(make_pair(in,-t),i);
      |              ^~~~~~~~~~
a.cc:47:47: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
   47 |     for(int i=0;i < a; i++)printf("%d\n",p[i].second+1);
      |                                               ^~~~~~
Language: C++

#include<iostream>
#include<utility>
#include<string>
#include<algorithm>
using namespace std;
char in[120];
pair<pair<string,int>,int> p[101];
int main(){
int a;
cin>>a;
for(int i=0;i<a;i++){
int t;
  cin>>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.first);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:47: error: request for member 'first' in 'p[i].std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>::second', which is of non-class type 'int'
   18 | for(int i=0;i<a;i++)printf("%d\n",p[i].second.first);
      |                                               ^~~~~
Language: C++

#include<iostream>
#include<utility>
#include<string>
using namespace std;
char in[120];
pair<pair<string,int>,int> p[110];
int main(){
int a;
cin>>a;
for(int i=0;i<a;i++){
int t;
  cin>>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:16:1: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 | sort(p,p+a);
      | ^~~~
      | short
Language: C++

#include<iostream>
#include<utility>
#include<string>
using namespace std;
char in[120];
pair<pair<string,int>,int> p[110];
int main(){
int a;
scanf("%d",&a);
for(int i=0;i<a;i++){
int t;
  scanf("%s%d",in,&t);
string tmp=in;
p[i]=make_pair(make_pair(in,-t),i);
}
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:16:1: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 | sort(p,p+a);
      | ^~~~
      | short
Language: C++

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


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

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


Compiler output:
a.cc:2:9: fatal error: pair: No such file or directory
    2 | #include<pair>
      |         ^~~~~~
compilation terminated.