Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
typedef vecS vector<string>
typedef vecI vector<int>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


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

return 0;
}


Compiler output:
a.cc:5:9: error: 'vecS' does not name a type
    5 | typedef vecS vector<string>
      |         ^~~~
a.cc:9:9: error: 'pair' does not name a type
    9 | typedef pair<int, int> P;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:16:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   16 | cin >> n;
      | ^~~
      | std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:17:1: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
   17 | pair<pair<string,int>,int> p(n);
      | ^~~~
      | std::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:89:12: note: 'std::pair' declared here
   89 |     struct pair;
      |            ^~~~
a.cc:17:11: error: 'string' was not declared in this scope
   17 | pair<pair<string,int>,int> p(n);
      |           ^~~~~~
a.cc:17:11: 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:
/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:17:18: error: expected primary-expression before 'int'
   17 | pair<pair<string,int>,int> p(n);
      |                  ^~~
a.cc:18:7: error: expected ';' before 's'
   18 | string s;
      |       ^~
      |       ;
a.cc:21:10: error: 's' was not declared in this scope
   21 |   cin >> s >> p;
      |          ^
a.cc:22:4: error: invalid types 'int[int]' for array subscript
   22 |   p[i] = make_pair(make_pair(s,-p),i+1);
      |    ^
a.cc:22:20: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
   22 |   p[i] = make_pair(make_pair(s,-p),i+1);
      |                    ^~~~~~~~~
      |                    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:22:10: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
   22 |   p[i] = make_pair(make_pair(s,-p),i+1);
      |          ^~~~~~~~~
      |          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:24:1: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   24 | sort(p,p+n);
      | ^~~~
      | 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:26:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |   cout << p[i].second << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:12: error: invalid types 'int[int]' for array subscript
   26 |   cout << p[i].second << endl;
      |            ^
a.cc:26:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |   cout << p[i].second << endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~