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

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

#using namespace std;

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:5:2: error: invalid preprocessing directive #icnlude; did you mean #include?
    5 | #icnlude <string>
      |  ^~~~~~~
      |  include
a.cc:7:2: error: invalid preprocessing directive #using
    7 | #using namespace std;
      |  ^~~~~
a.cc:9:1: error: 'pair' does not name a type
    9 | pair<pair<string , int>, int> p[110]
      | ^~~~
Language: C++

#include <stdio.h>
#include <isotream>
#include <vector>
#include <algorithm>
#icnlude <string>

#using namespace std;

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:2:10: fatal error: isotream: No such file or directory
    2 | #include <isotream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#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; scanf("%s%d", in ,&t);
        p[i] = make_pair(make_pair(in, -t), i);
    }
    sort(p, p + a);
    for (int i=0; i<a; ++i) {
        cout << p[i].second + 1 << endl;
    }
}

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

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

int main(){
int n, i, j, point;
 
  char name[100];
  cin >> n;
 
  pair<pair<string, int>, int> p[110];
  for(i=0; i<n; i++) {
    cin >> name >> point;
    p[i] = make_pair(make_pair(name, -point), i);
}

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


Input
Input is given from Standard Input in the following format:

N

S
1
 
P
1

:

S
N
 
P
N

Output
Print 
N
 lines. The 
i
-th line (
1
≤
i
≤
N
) should contain the identification number of the restaurant that is introduced 
i
-th in the book.

Sample Input 1 
Copy
6
khabarovsk 20
moscow 10
kazan 50
kazan 35
moscow 60
khabarovsk 40
Sample Output 1 
Copy
3
4
6
1
5
2
The lexicographical order of the names of the three cities is kazan 
<
 khabarovsk 
<
 moscow. For each of these cities, the restaurants in it are introduced in descending order of score. Thus, the restaurants are introduced in the order 
3
,
4
,
6
,
1
,
5
,
2
.

Sample Input 2 
Copy
10
yakutsk 10
yakutsk 20
yakutsk 30
yakutsk 40
yakutsk 50
yakutsk 60
yakutsk 70
yakutsk 80
yakutsk 90
yakutsk 100
Sample Output 2 
Copy
10
9
8
7
6
5
4
3
2
1
Language
Source Code
1
​
※ at most 512 KiB
※ Your source code will be saved as Main.extension.




FacebookTwitterTelegramShare
Rule Glossary
Terms of service Privacy Policy Information Protection Policy Company FAQ Contact
Copyright Since 2012 ©AtCoder Inc. All rights reserved.

Compiler output:
a.cc:28:1: error: extended character ≤ is not valid in an identifier
   28 | ≤
      | ^
a.cc:30:1: error: extended character ≤ is not valid in an identifier
   30 | ≤
      | ^
a.cc:100:1: error: extended character ※ is not valid in an identifier
  100 | ※ at most 512 KiB
      | ^
a.cc:101:1: error: extended character ※ is not valid in an identifier
  101 | ※ Your source code will be saved as Main.extension.
      | ^
a.cc:109:22: error: extended character © is not valid in an identifier
  109 | Copyright Since 2012 ©AtCoder Inc. All rights reserved.
      |                      ^
a.cc:2:1: error: 'Input' does not name a type
    2 | Input
      | ^~~~~
Language: C++

#include <iostream>
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:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(p,p+a);
      |     ^~~~
      |     short
Language: C++

#include <iostream>
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:13:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   13 |     std::sort(p,p+a);
      |          ^~~~
      |          qsort
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=0;i<n;i++){
    cin>>get<0>(x.at(i))>>get<1>(x.at(i));
    get<1>(x.at(i))=(-1)*get<1>(x.at(i))
    get<2>(x.at(i))=i+1;
  }
  sort(x.begin(),x.end());
  for(int j=0;j<n;j++)cout<<get<2>(x.at(j))<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:41: error: expected ';' before 'get'
    8 |     get<1>(x.at(i))=(-1)*get<1>(x.at(i))
      |                                         ^
      |                                         ;
    9 |     get<2>(x.at(i))=i+1;
      |     ~~~
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=0;i<n;i++){
    cin>>x.at(i).first>>x.at(i).second;
    x.at(i).third=i+1;
  }
  sort(x.begin(),x.end());
  for(int j=0;j<n;j++)cout<<x.at(j).third<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >::value_type' {aka 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>'} has no member named 'first'
    7 |     cin>>x.at(i).first>>x.at(i).second;
      |                  ^~~~~
a.cc:7:33: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >::value_type' {aka 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>'} has no member named 'second'
    7 |     cin>>x.at(i).first>>x.at(i).second;
      |                                 ^~~~~~
a.cc:8:13: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >::value_type' {aka 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>'} has no member named 'third'
    8 |     x.at(i).third=i+1;
      |             ^~~~~
a.cc:11:37: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >::value_type' {aka 'class std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>'} has no member named 'third'
   11 |   for(int j=0;j<n;j++)cout<<x.at(j).third<<endl;
      |                                     ^~~~~
Language: C++

#include "bits/stdc++.h"
#define ed cout<<"\n";
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long int
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define All(obj) (obj).begin(),(obj).end()

using namespace std;


int main() {
	speed;
	int n;
	cin >> n;
	pair<pair<string, int>, int>p[101];
	rep(i, n) {
		int P;
		string s;
		cin >> s >> P;
		p[i] = make_pair(make_pair(s, -P), i);
	}
	sort(p,p+n);
	int b[3] = { 1,2,3 };
	sort(b, b + 2);
	vector<pair<int,int>>b;
	rep(i, n) {
		cout << p[i].second + 1;
		ed;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:30: error: conflicting declaration 'std::vector<std::pair<int, int> > b'
   25 |         vector<pair<int,int>>b;
      |                              ^
a.cc:23:13: note: previous declaration as 'int b [3]'
   23 |         int b[3] = { 1,2,3 };
      |             ^
Language: C++

// abc128_a
// #include <bits/stdc++.h>
#include <iostream>
#include <vector>
typedef pair<pair<string, int>, int> shop;
using namespace std;
int main(void) {
	vector<shop> vc;
	int N;
	cin >> N;
	pair<pair<string, int>, int> p[100];
	for (int i = 0; i < N; i++) {
		string name, int point;
		cin >> name >> point;
		// vc.push_back(make_pair(make_pair(name, point), i));
		p[i] = make_pair(make_pair(name, point), i);
	}
	sort(p, p + N);

	return 0;
}

Compiler output:
a.cc:5:9: error: 'pair' does not name a type
    5 | typedef pair<pair<string, int>, int> shop;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:8:16: error: 'shop' was not declared in this scope
    8 |         vector<shop> vc;
      |                ^~~~
a.cc:8:20: error: template argument 1 is invalid
    8 |         vector<shop> vc;
      |                    ^
a.cc:8:20: error: template argument 2 is invalid
a.cc:13:30: error: expected unqualified-id before 'int'
   13 |                 string name, int point;
      |                              ^~~
a.cc:14:32: error: 'point' was not declared in this scope
   14 |                 cin >> name >> point;
      |                                ^~~~~
a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |         sort(p, p + N);
      |         ^~~~
      |         short
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:45: error: template argument 1 is invalid
    7 |         vector<pair<pair<string, int>, int> List;
      |                                             ^~~~
a.cc:7:45: error: template argument 2 is invalid
a.cc:12:17: error: 'List' was not declared in this scope
   12 |                 List[i] = make_pair(make_pair(S, A), i + 1);
      |                 ^~~~
a.cc:15:14: error: 'List' was not declared in this scope
   15 |         sort(List.begin(), List.end());
      |              ^~~~
Language: C++

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

int main(){
  int n;
  set<pair<pair<string, int>, int> S;
  cin >> n;
  for(int i = 0; i < n; i++){
  	string s;
    int r;
    cin >> s >> r;
    S.insert({{s, r}, i+1});
  }
  for(auto r:S) cout << r.second << " " << r.first.first<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:36: error: template argument 1 is invalid
    6 |   set<pair<pair<string, int>, int> S;
      |                                    ^
a.cc:6:36: error: template argument 2 is invalid
a.cc:6:36: error: template argument 3 is invalid
a.cc:12:5: error: 'S' was not declared in this scope
   12 |     S.insert({{s, r}, i+1});
      |     ^
a.cc:14:14: error: 'S' was not declared in this scope
   14 |   for(auto r:S) cout << r.second << " " << r.first.first<<"\n";
      |              ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:38: error: conflicting declaration 'std::vector<std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> > p'
   10 |   vector<pair<pair<string,int>,int>> p(n);
      |                                      ^
a.cc:7:9: note: previous declaration as 'int p'
    7 |   int n,p;
      |         ^
a.cc:13:6: error: invalid types 'int[int]' for array subscript
   13 |     p[i]=make_pair(make_pair(s,100-p),i+1);
      |      ^
a.cc:15:10: error: request for member 'begin' in 'p', which is of non-class type 'int'
   15 |   sort(p.begin(),p.end());
      |          ^~~~~
a.cc:15:20: error: request for member 'end' in 'p', which is of non-class type 'int'
   15 |   sort(p.begin(),p.end());
      |                    ^~~
a.cc:17:14: error: invalid types 'int[int]' for array subscript
   17 |     cout << p[i].second << endl;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N; cin >> N;
  vector<tuple<string, int, int>> guidebook;
  for(int i=1;i<N+1;i++){
    string S;
    int P;
    cin >> S >> P;
    P=-P
    guidebook.push_back(tie(S,P,i));
  }
  sort(guidebook.begin(), guidebook.end());
  for (int i=0;i<N;i++){
    cout << get<2>(guidebook.at(i)) << endl;
  }
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ';' before 'guidebook'
   11 |     P=-P
      |         ^
      |         ;
   12 |     guidebook.push_back(tie(S,P,i));
      |     ~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<string> s(n);
  vector<int> rp(n);
  vector<tuple<string,int,int>> d(n);
  for(int i=0; i<n; i++){
    int p;
    cin >> s[i];
    cin >> p;
    rp[i] = 100-p;
    d[i] = make_tuple(s[i],rp[i],i);
  }
  sort(d.begin(),d.end());
  for(int i=0; i<n; i++){
    cout << d[i].get(3) << endl;
  }
}

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

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

int main() {
  int N; cin >> N;
  vector<tuple<string, int, int>> list;
  for (i = 1; i <= N; i++) {
    string S;
    int P;
    cin >> S >> P;
    P *= -1;
    list.push_back(tie(S, P, i));
  }
  sort(list.begin(), list.end());
  for (i = 0; i < N; i++) {
    cout << get<2>(list.at(i)) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
    7 |   for (i = 1; i <= N; i++) {
      |        ^
a.cc:15:8: error: 'i' was not declared in this scope
   15 |   for (i = 0; i < N; i++) {
      |        ^
Language: C++

n = int(input())
book=[]
for i in range(n):
    a,b=input().split()
    temp=[a,int(b),i+1]
    book.append(temp)

book.reverse(key = lambda x:x[1])
book.sort(key = lambda x:x[0])

for j in range(len(book)):
    print(book[j][2])

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

n = int(input())
book=[]
for i in range(n):
    a,b=input().split()
    temp=[a,b,i+1]
    book.append(temp)

comb = [x[0] for x in book]

book2 = [[].append(y) for x in set(comb) for y in book if x == y[0]]

book3 = [sorted(j, key=lambda x: x[1]) for j in book2]

book4 = []
for t in range[len(book3)]:
    for s in range(len(book3[t])):
        book4.append(book3[t][s])
        
for q in range(len(book4)):
    print(book4[q][2])
    

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

#include <stdio.h>
int main(){
 #include<stdio.h>
 #include<string.h>
 
int main(void)
{
 
  int i, j;
 
  /* 文字列の数 */
  int num = 3;
 
  /* 文字列 */
  char moji[3][20], tmp[20];

  }
 
  for(i=1;i<num;i++){
    for(j=1;j<num;j++){
      if(strcmp(moji[j-1], moji[j])>0){
        strcpy(tmp, moji[j-1]);
        strcpy(moji[j-1], moji[j]);
        strcpy(moji[j], tmp);
      }
    }
  }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:7: error: 'i' undeclared (first use in this function)
   19 |   for(i=1;i<num;i++){
      |       ^
main.c:19:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:13: error: 'num' undeclared (first use in this function)
   19 |   for(i=1;i<num;i++){
      |             ^~~
main.c:20:9: error: 'j' undeclared (first use in this function)
   20 |     for(j=1;j<num;j++){
      |         ^
main.c:21:17: error: 'moji' undeclared (first use in this function)
   21 |       if(strcmp(moji[j-1], moji[j])>0){
      |                 ^~~~
main.c:22:16: error: 'tmp' undeclared (first use in this function)
   22 |         strcpy(tmp, moji[j-1]);
      |                ^~~
Language: C++


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

using namespace std;

int main(){

    int N;
    cin >> N;

    vector< tuple< string, int, int>> vec;

    for(int i=1; i<=N; i++)
    {
        string s;
        int p;
        cin >> s >> p; 
        p = -p
        vec.emplace_back(s,p,i);
    }

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

    for(int i=0; i<N ; i++)
    {
        cout << get<2>(vec[i]) << endl;
    }


}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:15: error: expected ';' before 'vec'
   22 |         p = -p
      |               ^
      |               ;
   23 |         vec.emplace_back(s,p,i);
      |         ~~~
Language: C++

#include <iostream>
#include <map>
#include <vector> 

using namespace std;
char in[120];
pair<paor<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++) cout << p[i].second+1); 
    return 0;
}

Compiler output:
a.cc:7:6: error: 'paor' was not declared in this scope
    7 | pair<paor<string, int>,int> p[110];
      |      ^~~~
a.cc:7:22: error: template argument 1 is invalid
    7 | pair<paor<string, int>,int> p[110];
      |                      ^
a.cc:7:23: error: expected unqualified-id before ',' token
    7 | pair<paor<string, int>,int> p[110];
      |                       ^
a.cc:7:24: error: expected unqualified-id before 'int'
    7 | pair<paor<string, int>,int> p[110];
      |                        ^~~
a.cc: In function 'int main()':
a.cc:17:9: error: 'p' was not declared in this scope
   17 |         p[i] = make_pair(make_pair(in, -t),i);
      |         ^
a.cc:20:10: error: 'p' was not declared in this scope
   20 |     sort(p,p+a);
      |          ^
a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |     sort(p,p+a);
      |     ^~~~
      |     short
Language: C++

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

int main(){

 int N,P;
 cin >> N;
 string s;
 pair<pair<string,int>,int> p[110];

 for(int i=0;i<N;i++){
 cin>>s>>P;
 p[i]=make_pair(make_pair(s,-P),i);
 }

 sort(p,p+a);

 for(int i=0;i<N;i++){
 printf("%d\n",p[i].second+1);
}
 return 0;
}

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

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

int main(){


 int N,P;
 cin >> N;
 string s;
 pair<pair<string,int>,int> p[110];

 for(int i=0;i<N;i++){
 cin>>s>>P;
 p[i]=make_pair(make_pair(s,-P),i);
 }

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

 return 0;
}

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

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

int main(){
  int N;
  cin >> N;
  vector<tuple<string,int,int>> a;
  
  for (int i=1;i<=N;i++){
    string s;
    int p;
    cin >> s >> p;
    p = -p;
    a.emplace_back(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:20:23: error: expected ';' before ')' token
   20 |   for (int i=0;i<N,i++){
      |                       ^
      |                       ;
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<tuple<string,int,int>> a;
  
  for (int i=1;i<=N;i++){
    string s;
    int p;
    cin >> s >> p;
    p = -p;
    a.emplace_back(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:20:23: error: expected ';' before ')' token
   20 |   for (int i=0;i<N,i++){
      |                       ^
      |                       ;
a.cc:21:25: error: expected ';' before 'endl'
   21 |     cout << get<2>(a[i]) endl;
      |                         ^~~~~
      |                         ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: expected ';' before ')' token
   20 |   for (int i=0;i<N,i++){
      |                       ^
      |                       ;
a.cc:21:25: error: expected ';' before 'endl'
   21 |     cout << get<2>(a[i]) endl;
      |                         ^~~~~
      |                         ;
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: expected ';' before ')' token
   20 |   for (int i=0;i<N,i++){
      |                       ^
      |                       ;
a.cc:21:25: error: expected ';' before 'endl'
   21 |     cout << get<2>(a[i]) endl;
      |                         ^~~~~
      |                         ;
a.cc:22:4: error: expected '}' at end of input
   22 |   }
      |    ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

#include <iostream>
#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<N,i++){
    cout << get<2>(a[i]) endl;
  }


Compiler output:
a.cc:3:18: error: missing terminating > character
    3 | #include <string?
      |                  ^
a.cc:3:10: fatal error: string?: No such file or directory
    3 | #include <string?
      |          ^
compilation terminated.
Language: C++

#include <iostream>
#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<N,i++){
    cout << get<2>(a[i]) endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
a.cc:19:23: error: expected ';' before ')' token
   19 |   for (int i=0;i<N,i++){
      |                       ^
      |                       ;
a.cc:20:25: error: expected ';' before 'endl'
   20 |     cout << get<2>(a[i]) endl;
      |                         ^~~~~
      |                         ;
a.cc:21:4: error: expected '}' at end of input
   21 |   }
      |    ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <iostream>
#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<N,i++){
    cout << get<2>(a[i]) endl;
  }

Compiler output:
a.cc:3:18: error: missing terminating > character
    3 | #include <string?
      |                  ^
a.cc:3:10: fatal error: string?: No such file or directory
    3 | #include <string?
      |          ^
compilation terminated.
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+1;i++) {
    string s;
    int P;
    cin >> s >> P;
    i = -i;
    a.push_back(tie(s,P,i))
  }
  sort(a.begin(),a.end())
  for (int i=0;i<N;i++) {
    cout << get<2>a(i) << endl;
  }
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: expected ';' before '}' token
   12 |     a.push_back(tie(s,P,i))
      |                            ^
      |                            ;
   13 |   }
      |   ~                         
a.cc:14:26: error: expected ';' before 'for'
   14 |   sort(a.begin(),a.end())
      |                          ^
      |                          ;
   15 |   for (int i=0;i<N;i++) {
      |   ~~~                     
a.cc:15:16: error: 'i' was not declared in this scope
   15 |   for (int i=0;i<N;i++) {
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
 
int main(){
  int N;
  cin >>N;
  vector<tuple<string,int,int>> a(N);
  for(int i =0;i<N;i++){
   int x,y;
    cin >>x>> y;
    tie(x,100-y,i+1) =a.at(i);
  }
  sort(a.begin(),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:12:14: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   12 |     tie(x,100-y,i+1) =a.at(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, int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
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);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    8 | int main(){
      |         ^~
a.cc:8:9: note: remove parentheses to default-initialize a variable
    8 | int main(){
      |         ^~
      |         --
a.cc:8:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:8:11: error: a function-definition is not allowed here before '{' token
    8 | int main(){
      |           ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>

using namespace std;

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


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

#include <iostream>

using namespace std;

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


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

#include <iostream>

using namespace std;

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

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

#include <stdio.h>
#include <algorithm>
#include <map>
#include <vector>
using namespace std;

int N;
int t;
string S;
pair<pair<string,int>,int> p[110];

int main(){
  cin >> N;
  for(int i=0;i<N;i++){
    cin >> S;
    cin >> t;
    p[i] = make_pair(make_pair(S,-t),i);
  }
  
  sort(p.begin(),p.end());
  for(int i=0;i<N;i++){
    cout << p[i] << endl;
  }
}
  


Compiler output:
a.cc:9:1: error: 'string' does not name a type; did you mean 'stdin'?
    9 | string S;
      | ^~~~~~
      | stdin
a.cc:10:11: error: 'string' was not declared in this scope
   10 | pair<pair<string,int>,int> p[110];
      |           ^~~~~~
a.cc:5:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    4 | #include <vector>
  +++ |+#include <string>
    5 | using namespace std;
a.cc:10:21: error: template argument 1 is invalid
   10 | pair<pair<string,int>,int> p[110];
      |                     ^
a.cc:10:26: error: template argument 1 is invalid
   10 | pair<pair<string,int>,int> p[110];
      |                          ^
a.cc: In function 'int main()':
a.cc:13:3: error: 'cin' was not declared in this scope
   13 |   cin >> N;
      |   ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <vector>
  +++ |+#include <iostream>
    5 | using namespace std;
a.cc:15:12: error: 'S' was not declared in this scope
   15 |     cin >> S;
      |            ^
a.cc:20:10: error: request for member 'begin' in 'p', which is of non-class type 'int [110]'
   20 |   sort(p.begin(),p.end());
      |          ^~~~~
a.cc:20:20: error: request for member 'end' in 'p', which is of non-class type 'int [110]'
   20 |   sort(p.begin(),p.end());
      |                    ^~~
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout << p[i] << endl;
      |     ^~~~
a.cc:22:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:21: error: 'endl' was not declared in this scope
   22 |     cout << p[i] << endl;
      |                     ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    4 | #include <vector>
  +++ |+#include <ostream>
    5 | using namespace std;
Language: C++

#include <stdio.h>
#include <algorithm>
#include <map>
#include <vector>

int N;
int t;
string S;
pair<pair<string,int>,int> p[110];

int main(){
  cin >> N;
  for(int i=0;i<N;i++){
    cin >> S;
    cin >> t;
    p[i] = make_pair(make_pair(S,-t),i);
  }
  
  sort(p.begin(),p.end());
  for(int i=0;i<N;i++){
    cout << p[i] << endl;
  }
}
  

Compiler output:
a.cc:8:1: error: 'string' does not name a type; did you mean 'stdin'?
    8 | string S;
      | ^~~~~~
      | stdin
a.cc:9:1: error: 'pair' does not name a type
    9 | pair<pair<string,int>,int> p[110];
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
   12 |   cin >> N;
      |   ^~~
a.cc:14:12: error: 'S' was not declared in this scope
   14 |     cin >> S;
      |            ^
a.cc:16:5: error: 'p' was not declared in this scope
   16 |     p[i] = make_pair(make_pair(S,-t),i);
      |     ^
a.cc:16:22: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
   16 |     p[i] = make_pair(make_pair(S,-t),i);
      |                      ^~~~~~~~~
      |                      std::make_pair
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_pair.h:1132:5: note: 'std::make_pair' declared here
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
a.cc:16:12: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
   16 |     p[i] = make_pair(make_pair(S,-t),i);
      |            ^~~~~~~~~
      |            std::make_pair
/usr/include/c++/14/bits/stl_pair.h:1132:5: note: 'std::make_pair' declared here
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
a.cc:19:8: error: 'p' was not declared in this scope
   19 |   sort(p.begin(),p.end());
      |        ^
a.cc:19:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   19 |   sort(p.begin(),p.end());
      |   ^~~~
      |   std::sort
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout << p[i] << endl;
      |     ^~~~
a.cc:21:21: error: 'endl' was not declared in this scope
   21 |     cout << p[i] << endl;
      |                     ^~~~
Language: C

#include<stdio.h>
#include<string.h>

int main(){
  int a,i,j,n;
  scanf("%d",&n);
  
  char c[10][n],temp1[10];
  int p[n];
  int jun[n],temp;
  for(i=0;i<n;i++){
    scanf("%s %d",c[i],&p[i]);
    jun[i]=i+1;
  }
  for(j=1;j<n;j++){
    for(i=1;i<n;i++){
      if(strcmp(c[i-1],c[i])>0){
        strcpy(temp1,c[i]);
        strcpy(c[i],c[i-1]);
        strcpy(c[i-1],temp1);
        temp=p[i];
        p[i]=p[i-1];
        p[i-1]=temp;
        temp=jun[i];
        jun[i]=jun[i-1];
        jun[i-1]=temp;
      }
      else if(c[i-1]==c[i]){
          if(p[i-1]<p[i]){
            temp=p[i];
            p[i]=p[i-1];
            p[i-1]=temp;
            temp=jun[i];
            jun[i]=jun[i-1];
            jun[i-1]=temp;
          }
      }
    }
  }
  for(i=0;i<n;i++){
    printf("%d\n",,jun[i]);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:41:19: error: expected expression before ',' token
   41 |     printf("%d\n",,jun[i]);
      |                   ^
Language: C++

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

char in[120];
pair<pair<string,int>,int>;p[110];
int main (){
    int a; scanf("%d",&a);
    for(int i=0;i<a;i++){
        int t; scanf("%d",&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:5:1: error: declaration does not declare anything [-fpermissive]
    5 | pair<pair<string,int>,int>;p[110];
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:5:28: error: 'p' does not name a type
    5 | pair<pair<string,int>,int>;p[110];
      |                            ^
a.cc: In function 'int main()':
a.cc:11:9: error: 'p' was not declared in this scope
   11 |         p[i]=make_pair(make_pair(in,-t),i);
      |         ^
a.cc:13:11: error: 'p' was not declared in this scope
   13 |     sort (p,p+a);
      |           ^
Language: C++

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

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

    map<pair<string,int>,int> R;

    string cityname;
    int score;
    for(int citynumber=0;citynumber<n;citynumber++){
        cin >> cityname >> score;
        R.insert({{cityname,-score},citynumber+1});
    }

    for(auto i=R.begin();i != R.end() ;i++){
        cout << i.second << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:19: error: 'struct std::_Rb_tree_iterator<std::pair<const std::pair<std::__cxx11::basic_string<char>, int>, int> >' has no member named 'second'
   19 |         cout << i.second << endl;
      |                   ^~~~~~
Language: C++

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

int main(){
  int n; cin>>n;
  pair<pair<string,int>,int> rest[110];
  for(int i=0;i<n;i++){
    string s;
    int p;
    cin>>s >>p;
    rest[i]=make_pair(make_pair(s,-p),i);
  }
  sort(rest,rest+n);
  for(int i=0;i<n;i++)cout<<p[i].second+1<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: 'p' was not declared in this scope
   15 |   for(int i=0;i<n;i++)cout<<p[i].second+1<<endl;
      |                             ^
Language: C++

#include<iostream>
#include<vector>
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.emplace_back(tie(S,P,i));
    }
    sort(a.begin(),a.end());
    for(int i = 0; i <= N-1; i++){
        cout << get<2>(a[i])<<endl;
//        string S;
//        int P;
//        int id;
//        tie(S, P, id) = a[i];
//        cout << id << endl;
    }
    
}


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

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

int main(){
    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.emplace_back(tie(S,P,i));
    }
    sort(a.begin(),a.end());
    for(int i = 0; i <= N-1; i++){
       // cout << get<2>(a[i])<<endl;
        string S;
        int P;
        int id;
        tie(S, P, id) = a[i];
        cout << id << endl;
    }
    
}


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

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

int main(){
    int N;
    cin >> N;
    vector<tuple<string, int, int>> a;
    for(int i = 1; i <= N; ++i){
        string S;
        int P;
        cin >> S >> P;
        P = -P;
        a.push_back(tie(S,P,i));
    }
    sort(a.begin(),a.end());
    for(int i = 0; i <= N-1; i++){
        cout << get<2>(a[i])<<endl;
    }
    
}


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

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

int main(){
    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.emplace_back(S,P,i);
    }
    sort(a.begin(),a.end());
    for(int i = 0; i <= N-1; i--){
        string S;
        int P;
        int id;
        tie(S, P, id)= a[i];
        cout << id << endl;
    }
    
}

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

#include<iostream>
#include<string>
#include<utility>
using namespace std;

int main(){
  pair<pair<string,int>, int> p[100];
  int n;
  cin >> n;
  string str;
  int num;
  for(int i=0;i<n;i++){
    cin >> str >> num;
    p[i] = make_pair(make_pair(str,-num),i+1);
  }
  sort(p,p+n);
  for(int i=0;i<n;i++){
    cout << p[i].second << endl;
  }
}


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

#include<iostream>
#include<string>
#include<utility>
using namespace std;

int main(){
  pair<pair<string,int> int> p[100];
  int n;
  cin >> n;
  string str;
  int num;
  for(int i=0;i<n;i++){
    cin >> str >> num;
    p[i] = make_pair(make_pair(str,num),i+1);
  }
  sort(p,p+n);
  for(int i=0;i<n;i++){
    cout << p[i].second << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: two or more data types in declaration of 'type name'
    7 |   pair<pair<string,int> int> p[100];
      |        ^~~~~~~~~~~~~~~~
a.cc:7:28: error: wrong number of template arguments (1, should be 2)
    7 |   pair<pair<string,int> int> p[100];
      |                            ^
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:3013:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
 3013 |     struct pair;
      |            ^~~~
a.cc:14:21: error: cannot convert 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>' to 'int' in assignment
   14 |     p[i] = make_pair(make_pair(str,num),i+1);
      |            ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
      |                     |
      |                     std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>
a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |   sort(p,p+n);
      |   ^~~~
      |   short
a.cc:18:18: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
   18 |     cout << p[i].second << endl;
      |                  ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  pair<pair<string,int> int> p[100];
  int n;
  cin >> n;
  string str;
  int num;
  for(int i=0;i<n;i++){
    cint >> str >> num;
    p[i] = make_pair(make_pair(str,num),i+1);
  }
  sort(p,p+n);
  for(int i=0;i<n;i++){
    cout << p[i].second << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: two or more data types in declaration of 'type name'
    5 |   pair<pair<string,int> int> p[100];
      |        ^~~~~~~~~~~~~~~~
a.cc:5:28: error: wrong number of template arguments (1, should be 2)
    5 |   pair<pair<string,int> int> p[100];
      |                            ^
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:3013:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
 3013 |     struct pair;
      |            ^~~~
a.cc:11:5: error: 'cint' was not declared in this scope; did you mean 'uint'?
   11 |     cint >> str >> num;
      |     ^~~~
      |     uint
a.cc:12:21: error: cannot convert 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>' to 'int' in assignment
   12 |     p[i] = make_pair(make_pair(str,num),i+1);
      |            ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
      |                     |
      |                     std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int>
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |   sort(p,p+n);
      |   ^~~~
      |   short
a.cc:16:18: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
   16 |     cout << p[i].second << endl;
      |                  ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  	int n; cin >> n;
  	vector<pair<string, int>> arr;
  	for (int i = 0; i < n; ++i) {
    	string s; cin >> s;
      	int p; cin >> p;
      	arr.push_back({s, p});
    }
  	vector<pair<string, int>> cpy(arr);
  	sort(cpy.begin(), cpy.end(), [](pair<string, int> a, pair<string, int> b){
    	if (a.first == b.first) {
        	return a.second < b.second;
        } else {
        	return a.first < b.first;
        }
    });
  	for (int i = 0; i < n; ++i) {
    	cout << (int)(arr.find(arr.begin(), arr.end(), cpy[i]) - arr.begin()) + 1 << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:27: error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int> >' has no member named 'find'
   23 |         cout << (int)(arr.find(arr.begin(), arr.end(), cpy[i]) - arr.begin()) + 1 << endl;
      |                           ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  	int n; cin >> n;
  	vector<pair<string, int>> arr;
  	for (int i = 0; i < n; ++i) {
    	string s; cin >> s;
      	int p; cin >> p;
      	arr.push_back({s, p});
    }
  	vector<pair<string, int>> cpy(arr);
  	sort(cpy.begin(), cpy.end(), [](pair<string, int> a, pair<string, int> a){
    	if (a.first == b.first) {
        	return a.second < b.second;
        } else {
        	return a.first < b.first;
        }
    });
  	for (int i = 0; i < n; ++i) {
    	cout << (int)(arr.find(cpy[i]) - arr.begin()) + 1 << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:80: error: redefinition of 'std::pair<std::__cxx11::basic_string<char>, int> a'
   15 |         sort(cpy.begin(), cpy.end(), [](pair<string, int> a, pair<string, int> a){
      |                                                              ~~~~~~~~~~~~~~~~~~^
a.cc:15:59: note: 'std::pair<std::__cxx11::basic_string<char>, int> a' previously declared here
   15 |         sort(cpy.begin(), cpy.end(), [](pair<string, int> a, pair<string, int> a){
      |                                         ~~~~~~~~~~~~~~~~~~^
a.cc: In lambda function:
a.cc:16:24: error: 'b' was not declared in this scope
   16 |         if (a.first == b.first) {
      |                        ^
a.cc: In function 'int main()':
a.cc:23:27: error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int> >' has no member named 'find'
   23 |         cout << (int)(arr.find(cpy[i]) - arr.begin()) + 1 << endl;
      |                           ^~~~