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

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

int main() {
	int n;
	cin>>n;
	vector<tuple<string,int,int>> list;
	
	for(int i=0;i<n;i++){
		string s;
		int t;
		
		cin>>s>>t;
		t=-t;
		
		list.push_back(make_tuple(s,t,i+1))
	}
	
	sort(list.begin(),list.end());
	for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
}

//vector,tuple,pairの取り扱いわからん。

Compiler output:
a.cc: In function 'int main()':
a.cc:17:52: error: expected ';' before '}' token
   17 |                 list.push_back(make_tuple(s,t,i+1))
      |                                                    ^
      |                                                    ;
   18 |         }
      |         ~                                           
a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |         sort(list.begin(),list.end());
      |         ^~~~
      |         short
a.cc:21:46: error: no match for call to '(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >) (int&)'
   21 |         for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
      |                                          ~~~~^~~
Language: C++

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

int main() {
	int n;
	cin>>n;
	vector<tuple<string,int,int>> list(n);
	
	for(int i=0;i<n;i++){
		string s;
		int t;
		
		cin>>s>>t;
		t=-t;
		
		list(i)= make_tuple(s, -t, i+1);
	}
	
	sort(list.begin(),list.end());
	for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
}

//vector,tuple,pairの取り扱い

Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: no match for call to '(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >) (int&)'
   17 |                 list(i)= make_tuple(s, -t, i+1);
      |                 ~~~~^~~
a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |         sort(list.begin(),list.end());
      |         ^~~~
      |         short
a.cc:21:46: error: no match for call to '(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >) (int&)'
   21 |         for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
      |                                          ~~~~^~~
Language: C++

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

int main() {
	int n;
	cin>>n;
	vector<tuple<string,int,int>> list(n);
	
	for(int i=0;i<n;i++){
		string s;
		int t;
		
		cin>>s>>t;
		t=-t;
		
		list[i]= make_tuple(s, -t, i+1);
	}
	
	sort(list.begin(),list.end());
	for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
}

//vector,tuple,pairの取り扱い

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |         sort(list.begin(),list.end());
      |         ^~~~
      |         short
a.cc:21:46: error: no match for call to '(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >) (int&)'
   21 |         for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
      |                                          ~~~~^~~
Language: C++

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

int main() {
	int n;
	cin>>n;
	vector<tuple<string,int,int>> list(n);
	
	for(int i=0;i<n;i++){
		string s;
		int t;
		
		cin>>s>>t;
		t=-t;
		list(i).push_back(tie(s,t,i+1));
	}
	
	sort(list.begin(),list.end());
	for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
}

//vector,tuple,pairの取り扱い

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: no match for call to '(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >) (int&)'
   16 |                 list(i).push_back(tie(s,t,i+1));
      |                 ~~~~^~~
a.cc:16:44: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   16 |                 list(i).push_back(tie(s,t,i+1));
      |                                           ~^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/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/tuple:2791:19: note:   initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {__cxx11::basic_string<char, char_traits<char>, allocator<char> >, int, int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
a.cc:19:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |         sort(list.begin(),list.end());
      |         ^~~~
      |         short
a.cc:20:46: error: no match for call to '(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> >) (int&)'
   20 |         for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
      |                                          ~~~~^~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  
  vector<pair<pair<string, int>, int>> res(N);
  for(int i = 0; i < N; i++){
    string city;int score;
    cin >> city >> score;
    score *= (-1);
    
    res.at(i) = make_pair(make_pair(city, score), i + 1);
  }
  
  sort(res.begin(), res.end());
  
  for(int  = 0; i < N; i++){
    cout << res.at(i).second << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: expected unqualified-id before '=' token
   19 |   for(int  = 0; i < N; i++){
      |            ^
a.cc:19:10: error: expected ';' before '=' token
   19 |   for(int  = 0; i < N; i++){
      |          ^ ~
      |          ;
a.cc:19:12: error: expected primary-expression before '=' token
   19 |   for(int  = 0; i < N; i++){
      |            ^
a.cc:19:17: error: 'i' was not declared in this scope
   19 |   for(int  = 0; i < N; i++){
      |                 ^
a.cc:19:22: error: expected ')' before ';' token
   19 |   for(int  = 0; i < N; i++){
      |      ~               ^
      |                      )
a.cc:19:24: error: 'i' was not declared in this scope
   19 |   for(int  = 0; i < N; i++){
      |                        ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n;
	cin>>n;
	vector<tuple<string,int,int>> list(n);
	
	for(int i=0;i<n;i++){
		string s;
		int t;
		
		cin>>s>>t;
		t=-t;
		list(i).push_back(tie(s,t,i+1));
	}
	
	sort(list.begin(),list.end());
	for(int i=0;i<n;i++)cout<<get<3>(list(i))<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'vector' was not declared in this scope
    7 |         vector<tuple<string,int,int>> list(n);
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:36: error: expected primary-expression before '>' token
    7 |         vector<tuple<string,int,int>> list(n);
      |                                    ^~
a.cc:7:39: error: 'list' was not declared in this scope
    7 |         vector<tuple<string,int,int>> list(n);
      |                                       ^~~~
a.cc:2:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
    1 | #include <iostream>
  +++ |+#include <list>
    2 | using namespace std;
a.cc:15:44: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   15 |                 list(i).push_back(tie(s,t,i+1));
      |                                           ~^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/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/tuple:2791:19: note:   initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {__cxx11::basic_string<char, char_traits<char>, allocator<char> >, int, int}]'
 2791 |     tie(_Elements&... __args) noexcept
      |         ~~~~~~~~~~^~~~~~~~~~
a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |         sort(list.begin(),list.end());
      |         ^~~~
      |         short
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector<tuple<string,int,int>> list[110];

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: reference to 'list' is ambiguous
   16 |                 list.push_back(tie(s,t,i));
      |                 ^~~~
In file included from /usr/include/c++/14/list:65,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:150,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_list.h:633:11: note: candidates are: 'template<class _Tp, class _Alloc> class std::__cxx11::list'
  633 |     class list : protected _List_base<_Tp, _Alloc>
      |           ^~~~
a.cc:3:31: note:                 'std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> > list [110]'
    3 | vector<tuple<string,int,int>> list[110];
      |                               ^~~~
a.cc:19:14: error: reference to 'list' is ambiguous
   19 |         sort(list.begin(),list.end());
      |              ^~~~
/usr/include/c++/14/bits/stl_list.h:633:11: note: candidates are: 'template<class _Tp, class _Alloc> class std::__cxx11::list'
  633 |     class list : protected _List_base<_Tp, _Alloc>
      |           ^~~~
a.cc:3:31: note:                 'std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> > list [110]'
    3 | vector<tuple<string,int,int>> list[110];
      |                               ^~~~
a.cc:19:27: error: reference to 'list' is ambiguous
   19 |         sort(list.begin(),list.end());
      |                           ^~~~
/usr/include/c++/14/bits/stl_list.h:633:11: note: candidates are: 'template<class _Tp, class _Alloc> class std::__cxx11::list'
  633 |     class list : protected _List_base<_Tp, _Alloc>
      |           ^~~~
a.cc:3:31: note:                 'std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> > list [110]'
    3 | vector<tuple<string,int,int>> list[110];
      |                               ^~~~
a.cc:20:23: error: 'N' was not declared in this scope
   20 |         for(int i=0;i<N;i++)cout<<get<3>(p[i])<<endl;
      |                       ^
a.cc:20:42: error: 'p' was not declared in this scope
   20 |         for(int i=0;i<N;i++)cout<<get<3>(p[i])<<endl;
      |                                          ^
Language: C++

#include <iostream>
using namespace std;
vector<tuple<string,int,int>> list[110];

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


Compiler output:
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<tuple<string,int,int>> list[110];
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:16:17: error: 'list' was not declared in this scope
   16 |                 list.push_back(tie(s,t,i));
      |                 ^~~~
a.cc:2:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
    1 | #include <iostream>
  +++ |+#include <list>
    2 | using namespace std;
a.cc:19:14: error: 'list' was not declared in this scope
   19 |         sort(list.begin(),list.end());
      |              ^~~~
a.cc:19:14: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
a.cc:19:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |         sort(list.begin(),list.end());
      |         ^~~~
      |         short
a.cc:20:23: error: 'N' was not declared in this scope
   20 |         for(int i=0;i<N;i++)cout<<get<3>(p[i])<<endl;
      |                       ^
a.cc:20:42: error: 'p' was not declared in this scope
   20 |         for(int i=0;i<N;i++)cout<<get<3>(p[i])<<endl;
      |                                          ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'vector' was not declared in this scope
    6 |         vector<tuple<string,int,int>> list[110];
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:36: error: expected primary-expression before '>' token
    6 |         vector<tuple<string,int,int>> list[110];
      |                                    ^~
a.cc:6:39: error: 'list' was not declared in this scope
    6 |         vector<tuple<string,int,int>> list[110];
      |                                       ^~~~
a.cc:2:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>'
    1 | #include <iostream>
  +++ |+#include <list>
    2 | using namespace std;
a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |         sort(list.begin(),list.end());
      |         ^~~~
      |         short
a.cc:19:23: error: 'N' was not declared in this scope
   19 |         for(int i=0;i<N;i++)cout<<get<3>(p[i])<<endl;
      |                       ^
a.cc:19:42: error: 'p' was not declared in this scope
   19 |         for(int i=0;i<N;i++)cout<<get<3>(p[i])<<endl;
      |                                          ^
Language: C++

#include <bits/stdc++.h>

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:4:1: error: 'pair' does not name a type
    4 | pair<pair<string,int>,int> p[110];
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:1: error: 'string' was not declared in this scope
    9 | string tmp=in;
      | ^~~~~~
a.cc:9:1: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 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/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:10:1: error: 'p' was not declared in this scope
   10 | p[i]=make_pair(make_pair(in,-t),i);
      | ^
a.cc:10:16: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
   10 | p[i]=make_pair(make_pair(in,-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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/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:10:6: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
   10 | p[i]=make_pair(make_pair(in,-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:12:11: error: 'p' was not declared in this scope
   12 | std::sort(p,p+a);
      |           ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  
  vector<pair<pair<string, int>, int>> res(N);
  for(int i = 0; i < N; i++){
    string a;int b;
    cin >> a >> b;
    res.at(i) = maake_pair(make_pair(a, b), i);
  }
  
  sort(res.begin(), re.end());
  
  for(int i = 0; i < N; i++){
    cout << res.at(i).second << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'maake_pair' was not declared in this scope
   12 |     res.at(i) = maake_pair(make_pair(a, b), i);
      |                 ^~~~~~~~~~
a.cc:15:21: error: 're' was not declared in this scope; did you mean 'res'?
   15 |   sort(res.begin(), re.end());
      |                     ^~
      |                     res
Language: C++

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

int main(){
  int N;
  cin >> N;
  
  vector<pair<pair<string, int>>, int> res(N);
  for(int i = 0; i < N; i++){
    string a;int b;
    cin >> a >> b;
    res.at(i) = maake_pair(make_pair(a, b), i);
  }
  
  sort(res.begin(), re.end());
  
  for(int i = 0; i < N; i++){
    cout << res.at(i).second << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: wrong number of template arguments (1, should be 2)
    8 |   vector<pair<pair<string, int>>, int> res(N);
      |                               ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:8:38: error: template argument 1 is invalid
    8 |   vector<pair<pair<string, int>>, int> res(N);
      |                                      ^
a.cc:12:9: error: request for member 'at' in 'res', which is of non-class type 'int'
   12 |     res.at(i) = maake_pair(make_pair(a, b), i);
      |         ^~
a.cc:12:17: error: 'maake_pair' was not declared in this scope
   12 |     res.at(i) = maake_pair(make_pair(a, b), i);
      |                 ^~~~~~~~~~
a.cc:15:12: error: request for member 'begin' in 'res', which is of non-class type 'int'
   15 |   sort(res.begin(), re.end());
      |            ^~~~~
a.cc:15:21: error: 're' was not declared in this scope; did you mean 'res'?
   15 |   sort(res.begin(), re.end());
      |                     ^~
      |                     res
a.cc:18:17: error: request for member 'at' in 'res', which is of non-class type 'int'
   18 |     cout << res.at(i).second << endl;
      |                 ^~
Language: C++

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

int main(){
  int N;
  cin >> N;
  
  vector<tuple<auto, auto, auto>> vec(N);
  for(int i = 0; i < N; i++){
    string a;
    int b;
    cin >> a >> b;
    vec.at(i) = make_tuple(b, a, i);
  }
  
  sort(vec.begin(), vec.end());
  reverse(vec.begin(), vec.end());
  
  for(int i = 0; i < N; i++){
    int a, c;
    string b;
    tie(a, b, c) = vec;
    vec = make_tuple(b, a, c);
  }
  
  sort(vec.begin(), vec.end());
  
  for(int i = 0; i < N; i++){
    cout << get<2>(vec.at(i)) << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:32: error: template argument 1 is invalid
    8 |   vector<tuple<auto, auto, auto>> vec(N);
      |                                ^~
a.cc:8:40: error: template argument 1 is invalid
    8 |   vector<tuple<auto, auto, auto>> vec(N);
      |                                        ^
a.cc:8:40: error: template argument 2 is invalid
a.cc:13:5: error: 'vec' was not declared in this scope
   13 |     vec.at(i) = make_tuple(b, a, i);
      |     ^~~
a.cc:16:8: error: 'vec' was not declared in this scope
   16 |   sort(vec.begin(), vec.end());
      |        ^~~
Language: C++

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

int main() {
  int n;
  cin>>n;
  vector<tuple<string,int,int>>book(n);
  for(int i=0;i<n;i++) {
    cin>>get<0>(book[i])>>get<1>(book[i]);
    get<2>(book[i])=i+1;
    get<1>(book[i])*=-1
  }
  sort(book.begin(),book.end());
  for(int i=0;i<n;i++) cout<<get<2>(book[i])<<endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before '}' token
   11 |     get<1>(book[i])*=-1
      |                        ^
      |                        ;
   12 |   }
      |   ~
Language: C++

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

int main() {
  int n;
  cin>>n;
  vector<pair<string,int,int>>book(n);
  for(int i=0;i<n;i++) {
    cin>>get<0>(book[i])>>get<1>(book[i]);
    get<2>(book[i])=i+1;
    get<1>(book[i])*=-1
  }
  sort(book.begin(),book.end());
  for(int i=0;i<n;i++) cout<<get<2>(book[i])<<endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: wrong number of template arguments (3, should be 2)
    7 |   vector<pair<string,int,int>>book(n);
      |                          ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:7:29: error: template argument 1 is invalid
    7 |   vector<pair<string,int,int>>book(n);
      |                             ^~
a.cc:7:29: error: template argument 2 is invalid
a.cc:9:21: error: invalid types 'int[int]' for array subscript
    9 |     cin>>get<0>(book[i])>>get<1>(book[i]);
      |                     ^
a.cc:9:38: error: invalid types 'int[int]' for array subscript
    9 |     cin>>get<0>(book[i])>>get<1>(book[i]);
      |                                      ^
a.cc:10:16: error: invalid types 'int[int]' for array subscript
   10 |     get<2>(book[i])=i+1;
      |                ^
a.cc:11:16: error: invalid types 'int[int]' for array subscript
   11 |     get<1>(book[i])*=-1
      |                ^
a.cc:13:13: error: request for member 'begin' in 'book', which is of non-class type 'int'
   13 |   sort(book.begin(),book.end());
      |             ^~~~~
a.cc:13:26: error: request for member 'end' in 'book', which is of non-class type 'int'
   13 |   sort(book.begin(),book.end());
      |                          ^~~
a.cc:14:41: error: invalid types 'int[int]' for array subscript
   14 |   for(int i=0;i<n;i++) cout<<get<2>(book[i])<<endl;
      |                                         ^
Language: C++

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

int main() {
  int n;
  cin>>n;
  vector<pair<string,int,int>>book(n);
  for(int i=0;i<n;i++) {
    cin>>get<0>(book[i])>>get<1>(book[i]);
    get<2>(book[i])=i+1;
  }
  sort(book.begin(),book.end());
  for(int i=0;i<n;i++) cout<<get<2>(book[i])<<endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: wrong number of template arguments (3, should be 2)
    7 |   vector<pair<string,int,int>>book(n);
      |                          ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:7:29: error: template argument 1 is invalid
    7 |   vector<pair<string,int,int>>book(n);
      |                             ^~
a.cc:7:29: error: template argument 2 is invalid
a.cc:9:21: error: invalid types 'int[int]' for array subscript
    9 |     cin>>get<0>(book[i])>>get<1>(book[i]);
      |                     ^
a.cc:9:38: error: invalid types 'int[int]' for array subscript
    9 |     cin>>get<0>(book[i])>>get<1>(book[i]);
      |                                      ^
a.cc:10:16: error: invalid types 'int[int]' for array subscript
   10 |     get<2>(book[i])=i+1;
      |                ^
a.cc:12:13: error: request for member 'begin' in 'book', which is of non-class type 'int'
   12 |   sort(book.begin(),book.end());
      |             ^~~~~
a.cc:12:26: error: request for member 'end' in 'book', which is of non-class type 'int'
   12 |   sort(book.begin(),book.end());
      |                          ^~~
a.cc:13:41: error: invalid types 'int[int]' for array subscript
   13 |   for(int i=0;i<n;i++) cout<<get<2>(book[i])<<endl;
      |                                         ^
Language: C++

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

int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

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


Compiler output:
a.cc: In function 'int main()':
a.cc:27:12: error: expected '}' at end of input
   27 |   return 0;
      |            ^
a.cc:9:16: note: to match this '{'
    9 | int main(void) {
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int n;
  vector<pair<string, int>> k(n);
  rep(i,n){
    string s;
    int t;
    cin >> s >> t;
    pair<string, int> p;
    p=make_pair(s,-t);
    k[i]=p;
  }
  sort(k.bagin(),k.end());
  rep(i,n)cout << k[i].second*-1 << endl;
  
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, int> >' has no member named 'bagin'; did you mean 'begin'?
   15 |   sort(k.bagin(),k.end());
      |          ^~~~~
      |          begin
Language: C++

#include <iostream>
#include <vector>
using namespace std;
typedef pair<string,int> psi;

bool myCompare(pair<int, psi> a, pair<int, psi> b){
    if(a.second.first < b.second.first){
        return a.second.first < b.second.first;
    }else if(a.second.first == b.second.first){
        if(a.second.second > b.second.second) return a.second.second > b.second.second;
        else return false;
    }else{
        return false;
    }
}

int main(){
    int n; cin >> n;
    vector< pair<int, psi> > vec_id_city_score;
    vec_id_city_score.resize(n);
    for(int i=0; i<n; i++){
        vec_id_city_score[i].first = i+1;
        cin >> vec_id_city_score[i].second.first >> vec_id_city_score[i].second.second; 
    }
    sort(vec_id_city_score.begin(), vec_id_city_score.end(), myCompare);
    for(int i=0; i<n; i++) cout << vec_id_city_score[i].first << " : "  << vec_id_city_score[i].second.first << " : " << vec_id_city_score[i].second.second << "\n"; 

}

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

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

int main(){
  int n;
  cin >> n;
  vector<pair<string,int>> restraunt(n);
  map<pair<string,int>,int> rank;
  for(int i=0;i<n;i++){
    cin >> restraunt.at(i).first;
    cin >> restraunt.at(i).second;
    restraunt.at(i).second = 100 - restraunt.at(i).second;
    rank[restraunt.at(i)] = -1;
  }
  auto tmp = restranut;
  sort(tmp.begin(),tmp.end());
  for(int i=0;i<n;i++){
    rank[tmp.at(i)] = i+1;
  }
  for(auto x : restraunt) cout << rank.at(x) << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'restranut' was not declared in this scope; did you mean 'restraunt'?
   15 |   auto tmp = restranut;
      |              ^~~~~~~~~
      |              restraunt
Language: C++

N = int(input())
Book = [0] * N
for i in range(N):
    s,q = input().split()
    p = int(q)
    Book[i] = (s, 100-p, i)

Book.sort()

for i in range(N):
    print(Book[i][2]+1)




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

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

bool comp(pair<int ,pair<string,int>> &a,pair<int ,pair<string,int>> &b)
{
  if(((a.second).first)==((b.second).first))
    return ((a.second).second)>((b.second).second);
  else 
    return ((a.second).first)<((b.second).first));
}
int main()
{
  int n;
  cin>>n;
  vector<pair<int ,pair<string,int>>> v;
  
  for(int i=0;i<n;i++)
  {
    string s;
    int a;
    cin>>s>>a;
    v.push_back(make_pair(i+1,make_pair(s,a)));
  }
  
  sort(v.begin(),v.end(),comp);
  
  for(int i=0;i<n;i++)
  {
    cout<<v[i].first<<endl;
    
  }
  
  
  
}


Compiler output:
a.cc: In function 'bool comp(std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&, std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&)':
a.cc:9:49: error: expected ';' before ')' token
    9 |     return ((a.second).first)<((b.second).first));
      |                                                 ^
      |                                                 ;
a.cc:9:49: error: expected primary-expression before ')' token
Language: C++

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

bool comp(pair<int ,pair<string,int>> &a,pair<int ,pair<string,int>> &b)
{
  if(((a.second).first)==((b.second).first)))
    return ((a.second).second)>((b.second).second);
  else 
    return ((a.second).first)<((b.second).first));
}
int main()
{
  int n;
  cin>>n;
  vector<pair<int ,pair<string,int>>> v;
  
  for(int i=0;i<n;i++)
  {
    string s;
    int a;
    cin>>s>>a;
    v.push_back(make_pair(i+1,make_pair(s,a)));
  }
  
  sort(v.begin(),v.end(),comp);
  
  for(int i=0;i<n;i++)
  {
    cout<<v[i].first<<endl;
    
  }
  
  
  
}


Compiler output:
a.cc: In function 'bool comp(std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&, std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&)':
a.cc:6:45: error: expected primary-expression before ')' token
    6 |   if(((a.second).first)==((b.second).first)))
      |                                             ^
a.cc:9:49: error: expected ';' before ')' token
    9 |     return ((a.second).first)<((b.second).first));
      |                                                 ^
      |                                                 ;
a.cc:9:49: error: expected primary-expression before ')' token
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

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

bool comp(pair<int ,pair<string,int>> &a,pair<int ,pair<string,int>> &b)
{
  if(((a.second).first)==((b.second).first)))
    return (((a.second).second)>((b.second).second)));
  else 
    return ((a.second).first)<((b.second).first));
}
int main()
{
  int n;
  cin>>n;
  vector<pair<int ,pair<string,int>>> v;
  
  for(int i=0;i<n;i++)
  {
    string s;
    int a;
    cin>>s>>a;
    v..push_back(make_pair(i+1,make_pair(s,a)));
  }
  
  sort(v.begin(),v.end(),comp);
  
  for(int i=0;i<n;i++)
  {
    cout<<v[i].first<<endl;
    
  }
  
  
  
}


Compiler output:
a.cc: In function 'bool comp(std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&, std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&)':
a.cc:6:45: error: expected primary-expression before ')' token
    6 |   if(((a.second).first)==((b.second).first)))
      |                                             ^
a.cc:9:49: error: expected ';' before ')' token
    9 |     return ((a.second).first)<((b.second).first));
      |                                                 ^
      |                                                 ;
a.cc:9:49: error: expected primary-expression before ')' token
a.cc: In function 'int main()':
a.cc:22:7: error: expected unqualified-id before '.' token
   22 |     v..push_back(make_pair(i+1,make_pair(s,a)));
      |       ^
a.cc: In function 'bool comp(std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&, std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'bool comp(std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&, std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >&)':
a.cc:6:9: error: base operand of '->' has non-pointer type 'std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >'
    6 |   if(((a->second)->first)==((b->second)->first)))
      |         ^~
a.cc:6:31: error: base operand of '->' has non-pointer type 'std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >'
    6 |   if(((a->second)->first)==((b->second)->first)))
      |                               ^~
a.cc:6:49: error: expected primary-expression before ')' token
    6 |   if(((a->second)->first)==((b->second)->first)))
      |                                                 ^
a.cc:9:15: error: base operand of '->' has non-pointer type 'std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >'
    9 |     return ((a->second)->first)<((b->second)->first));
      |               ^~
a.cc:9:36: error: base operand of '->' has non-pointer type 'std::pair<int, std::pair<std::__cxx11::basic_string<char>, int> >'
    9 |     return ((a->second)->first)<((b->second)->first));
      |                                    ^~
a.cc:9:53: error: expected ';' before ')' token
    9 |     return ((a->second)->first)<((b->second)->first));
      |                                                     ^
      |                                                     ;
a.cc:9:53: error: expected primary-expression before ')' token
a.cc: In function 'int main()':
a.cc:22:7: error: expected unqualified-id before '.' token
   22 |     v..push_back(make_pair(i+1,make_pair(s,a)));
      |       ^
Language: C++

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

int main(){
  int N,points;
  string cities;
  cin >> N;
  pair<pair<string,int>,int> rest[N];

  for(int i=0;i<N;++i){
    cin >> cities;
    cin >> points;
    rest[i] = make_pair(make_pair(cities,100-points),i);
  }

  sort(rest,rest+N);
  
  for (int i=0;i<N;++i){
    cout >> rest.second(i) >> endl;
  }
}

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

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

int main(){
  int N,points;
  string cities;
  cin >> N;
  pair<pair<string,int>,int> rest[N];

  for(int i=0;i<N;++i){
    cin >> cities;
    cin >> points;
    rest[i] = make_pair(make_pair(cities,100-points),i);
  }

  sort(p,p+N);
  
  for (int i=0;i<N;++i){
    cout >> rest.second(i) >> endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'p' was not declared in this scope
   16 |   sort(p,p+N);
      |        ^
a.cc:19:18: error: request for member 'second' in 'rest', which is of non-class type 'std::pair<std::pair<std::__cxx11::basic_string<char>, int>, int> [N]'
   19 |     cout >> rest.second(i) >> endl;
      |                  ^~~~~~
Language: C++

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

int main(){
  int N,points;
  string cities;
  cin >> N;
  pair<pair<string,int>,int> rest[N];

  for(int i=0;i<N;++i){
    cin >> cities;
    cin >> points;
    rest[i] = make_pair(make_pair(cities,100-points),i);
  }

  sort(rest.begin(),rest.end());
  
  for (int i=0;i<N;++i){
    cout >> rest.second(i) >> endl;
  }
}

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

#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
int main() {
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++)cout<<p[i].second+1;
}

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

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

int main() {
  int N;
  cin >> N;
  vector<tuple<int,int,int>> a(N);
  
  for (int i = 0; i < N; i++) {
    cin >> a.at(i).second >> a.at(i).first;
    a.at(i).third = i+1;
  }
  
  sort(a.begin(), a.end());
  
  for (int i = 0; i < N; i++) {
    cout << a.at(i).third <<endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'class std::tuple<int, int, int>'} has no member named 'second'
   10 |     cin >> a.at(i).second >> a.at(i).first;
      |                    ^~~~~~
a.cc:10:38: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'class std::tuple<int, int, int>'} has no member named 'first'
   10 |     cin >> a.at(i).second >> a.at(i).first;
      |                                      ^~~~~
a.cc:11:13: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'class std::tuple<int, int, int>'} has no member named 'third'
   11 |     a.at(i).third = i+1;
      |             ^~~~~
a.cc:17:21: error: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'class std::tuple<int, int, int>'} has no member named 'third'
   17 |     cout << a.at(i).third <<endl;
      |                     ^~~~~
Language: C++

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

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

	vector<tuple <string,int,int> > a(N);
	
	for(int i=0;i<N;i++){
		string s;
		int p;
		cin>>s>>p;
		a.[i]=make_tuple(s,100-p,i+1);
	}
	sort(a.begin(),a.end());
	//cout<<"\n";
	for(int i=0;i<N;i++){
		string s;
		int p,k;
		tie(s,p,k)=a[i];
		cout<<k<<endl;
	}		
	
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected unqualified-id before '[' token
   14 |                 a.[i]=make_tuple(s,100-p,i+1);
      |                   ^
Language: C

n=int(input())
sp=[]
for i in range(n):
	s,p=input().split()
	sp.append([s,int(p),i+1])

sp.sort(key=lambda c:(c[0],-c[1]))
for i in sp:
	print(i[2])

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n=int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | n=int(input())
      |   ^~~
Language: C++

#include<bits/stdc++.h>
#include<string>

using namespace std ;
int main(){
  unorederd_map<pair<string,int>,int> m[110];
  
  int a;
  cin>>a;
  for(int i =0;i<a;i++){
    int t ;
    string city;
    
    cin>>city>>t;
    
    m[i] = make_pair(make_pair(city,-t),i);
  }
  sort(m.being(),m.being()+a);
  for(auto i =m.being();i!=m.being()+a;i++){
  
   
      cout<<m[i].second+1<<endl;
    
  } 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'unorederd_map' was not declared in this scope
    6 |   unorederd_map<pair<string,int>,int> m[110];
      |   ^~~~~~~~~~~~~
a.cc:6:33: error: expected primary-expression before ',' token
    6 |   unorederd_map<pair<string,int>,int> m[110];
      |                                 ^
a.cc:6:34: error: expected primary-expression before 'int'
    6 |   unorederd_map<pair<string,int>,int> m[110];
      |                                  ^~~
a.cc:16:5: error: 'm' was not declared in this scope
   16 |     m[i] = make_pair(make_pair(city,-t),i);
      |     ^
a.cc:18:8: error: 'm' was not declared in this scope
   18 |   sort(m.being(),m.being()+a);
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
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*=-1;
  a.push_back(tie(s,p,i));
}
sort(a.begin(),a.end());
for(int i=0;i<N;i++){
  cout<<get<2>(a.at(i))<<endl;
  
}


Compiler output:
a.cc:4:1: error: 'cin' does not name a type
    4 | cin<<N;
      | ^~~
a.cc:6:1: error: expected unqualified-id before 'for'
    6 | for(int i=1;i<=N;i++){
      | ^~~
a.cc:6:13: error: 'i' does not name a type
    6 | for(int i=1;i<=N;i++){
      |             ^
a.cc:6:18: error: 'i' does not name a type
    6 | for(int i=1;i<=N;i++){
      |                  ^
a.cc:13:5: error: expected constructor, destructor, or type conversion before '(' token
   13 | sort(a.begin(),a.end());
      |     ^
a.cc:14:1: error: expected unqualified-id before 'for'
   14 | for(int i=0;i<N;i++){
      | ^~~
a.cc:14:13: error: 'i' does not name a type
   14 | for(int i=0;i<N;i++){
      |             ^
a.cc:14:17: error: 'i' does not name a type
   14 | for(int i=0;i<N;i++){
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
  int n, a, b;
  cin >> n;
  vector<tuple<string, int, int>> A(n);
  rep(i, n) {
    cin >> get<0>(A[i]) >> get<1>(A[i]);
  }
  rep(i , n){
    get<2>(A[i]) = i+1;
  }

  sort(A.begin(), A.end());
  reverse(A.begin(), A.end());
  for(int i=n-1; i>=0; i--){
    cout << get<2>(A[i]) << endl;
  }
 
}#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
  int n, a, b;
  cin >> n;
  vector<tuple<string, int, int>> A(n);
  rep(i, n) {
    cin >> get<0>(A[i]) >> get<1>(A[i]);
  }
  rep(i , n){
    get<2>(A[i]) = i+1;
  }

  sort(A.begin(), A.end());
  reverse(A.begin(), A.end());
  for(int i=n-1; i>=0; i--){
    cout << get<2>(A[i]) << endl;
  }
 
}

Compiler output:
a.cc:23:2: error: stray '#' in program
   23 | }#include <bits/stdc++.h>
      |  ^
a.cc:23:3: error: 'include' does not name a type
   23 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:28:5: error: redefinition of 'int main()'
   28 | int main() {
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main() {
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
struct rest {
  string S;
  int P;
  int number;
};
bool restsort(const rest& a, const rest& b) {
  if (a.S < b.S) {
    return true;
  } else if (a.S > b.S) {
    return false;
  }
  return a.P > b.P;
}

int main()
{
  int N;
  cin >> N;
  vector <rest> R(N);
  for (int i = 0; i < N; i++) {
    cin >> R[i].S >> R[i].P;
    R.number = i+1;
  }
  sort(R.begin(), R.end(), restsort);
  for (int i = 0; i < N; i++) {
    cout << R[i].number << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:7: error: 'class std::vector<rest>' has no member named 'number'
   27 |     R.number = i+1;
      |       ^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
struct rest {
  string S;
  int P;
  int number;
};
bool restsort(const rest& a, const rest& b) {
  if (a.S < b.S) {
    return true;
  } else if (a.S > b.S) {
    return false;
  }
  return a.P > b.P;
}

int main()
{
  int N;
  cin >> N;
  vector <rest> R(N);
  for (int i = 0; i < N; i++) {
    cin >> R[i].S >> R[i].P;
    R.number = i+1;
  }
  sort(R.begin(), R.end(), restsort);
  for (int i = 0; i < N; i++) {
    cout << R.number << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:7: error: 'class std::vector<rest>' has no member named 'number'
   27 |     R.number = i+1;
      |       ^~~~~~
a.cc:31:15: error: 'class std::vector<rest>' has no member named 'number'
   31 |     cout << R.number << endl;
      |               ^~~~~~
Language: C++

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

int main() {
  cin.tie(0);
  ios::sycn_with_stdio(false);
  
  int n;
  cin >> n;
  vector<tuple<string, int, int>> v(n);
  for(int i = 0; i < n; i++) {
    string s;
    int a;
    cin >> s >> a;
    v[i] = make_tuple(s, a, i);
  }
  sort(v.begin(), v.end());
  for(int i = 0; i < n; i++) {
    cout << get<2>(v[i]) + 1 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'sycn_with_stdio' is not a member of 'std::ios' {aka 'std::basic_ios<char>'}
    6 |   ios::sycn_with_stdio(false);
      |        ^~~~~~~~~~~~~~~
Language: C++

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:36: error: expected primary-expression before ',' token
   11 |     res.push_back(make_tuple(string,100-P,i));
      |                                    ^