Language: C++

int main(void)
{
  int N;
  int t1;
  cin >> N;
  string S;
  vector<int> P(N);
  vector<char> s(N);
  vector<int> t(N);
  vector<int> c(N);
  for(int i=0;i<N;i++)
  {
    cin >> S >> P.at(i);
    s.at(i)=S.at(0);
    if(s.at(i)='a') t(i)=1;
    if(s.at(i)='b') t(i)=2;
    if(s.at(i)='c') t(i)=3;
    if(s.at(i)='d') t(i)=4;
    if(s.at(i)='e') t(i)=5;
    if(s.at(i)='f') t(i)=6;
    if(s.at(i)='g') t(i)=7;
    if(s.at(i)='h') t(i)=8;
    if(s.at(i)='i') t(i)=9;
    if(s.at(i)='j') t(i)=10;
    if(s.at(i)='k') t(i)=11;
  	if(s.at(i)='l') t(i)=12;
    if(s.at(i)='n') t(i)=13;
    if(s.at(i)='m') t(i)=14;
    if(s.at(i)='o') t(i)=15;
    if(s.at(i)='p') t(i)=16;
    if(s.at(i)='q') t(i)=17;
    if(s.at(i)='r') t(i)=18;
    if(s.at(i)='s') t(i)=19;
    if(s.at(i)='t') t(i)=20;
    if(s.at(i)='u') t(i)=21;
    if(s.at(i)='v') t(i)=22;
    if(s.at(i)='w') t(i)=23;
    if(s.at(i)='x') t(i)=24;
    if(s.at(i)='y') t(i)=25;
    if(s.at(i)='z') t(i)=26;
    c.at(i)=i+1;
    
  }
  
	for(int i=0;i<N;i++){
      for(int j=i;j>0;j--){
        if(t.at(j)<t.at(j-1) && p.at(j) <=p.at(j-1)){
          t1=c.at(j);
          c.at(j)=c.at(j-1);
          c.at(j-1)=t1;
        }else if(t.at(j)<t.at(j-1)){
          t1=c.at(j);
          c.at(j)=c.at(j-1);
          c.at(j-1)=t1;
        }
      }
    }
  
  for(int i=0;i<N;i++){
    cout << c.at(i) << endl;
  }
  return 0;
}

          

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N;
      |   ^~~
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string S;
      |   ^~~~~~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> P(N);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> P(N);
      |          ^~~
a.cc:8:10: error: expected primary-expression before 'char'
    8 |   vector<char> s(N);
      |          ^~~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   vector<int> t(N);
      |          ^~~
a.cc:10:10: error: expected primary-expression before 'int'
   10 |   vector<int> c(N);
      |          ^~~
a.cc:13:12: error: 'S' was not declared in this scope
   13 |     cin >> S >> P.at(i);
      |            ^
a.cc:13:17: error: 'P' was not declared in this scope
   13 |     cin >> S >> P.at(i);
      |                 ^
a.cc:14:5: error: 's' was not declared in this scope
   14 |     s.at(i)=S.at(0);
      |     ^
a.cc:15:21: error: 't' was not declared in this scope
   15 |     if(s.at(i)='a') t(i)=1;
      |                     ^
a.cc:16:21: error: 't' was not declared in this scope
   16 |     if(s.at(i)='b') t(i)=2;
      |                     ^
a.cc:17:21: error: 't' was not declared in this scope
   17 |     if(s.at(i)='c') t(i)=3;
      |                     ^
a.cc:18:21: error: 't' was not declared in this scope
   18 |     if(s.at(i)='d') t(i)=4;
      |                     ^
a.cc:19:21: error: 't' was not declared in this scope
   19 |     if(s.at(i)='e') t(i)=5;
      |                     ^
a.cc:20:21: error: 't' was not declared in this scope
   20 |     if(s.at(i)='f') t(i)=6;
      |                     ^
a.cc:21:21: error: 't' was not declared in this scope
   21 |     if(s.at(i)='g') t(i)=7;
      |                     ^
a.cc:22:21: error: 't' was not declared in this scope
   22 |     if(s.at(i)='h') t(i)=8;
      |                     ^
a.cc:23:21: error: 't' was not declared in this scope
   23 |     if(s.at(i)='i') t(i)=9;
      |                     ^
a.cc:24:21: error: 't' was not declared in this scope
   24 |     if(s.at(i)='j') t(i)=10;
      |                     ^
a.cc:25:21: error: 't' was not declared in this scope
   25 |     if(s.at(i)='k') t(i)=11;
      |                     ^
a.cc:26:25: error: 't' was not declared in this scope
   26 |         if(s.at(i)='l') t(i)=12;
      |                         ^
a.cc:27:21: error: 't' was not declared in this scope
   27 |     if(s.at(i)='n') t(i)=13;
      |                     ^
a.cc:28:21: error: 't' was not declared in this scope
   28 |     if(s.at(i)='m') t(i)=14;
      |                     ^
a.cc:29:21: error: 't' was not declared in this scope
   29 |     if(s.at(i)='o') t(i)=15;
      |                     ^
a.cc:30:21: error: 't' was not declared in this scope
   30 |     if(s.at(i)='p') t(i)=16;
      |                     ^
a.cc:31:21: error: 't' was not declared in this scope
   31 |     if(s.at(i)='q') t(i)=17;
      |                     ^
a.cc:32:21: error: 't' was not declared in this scope
   32 |     if(s.at(i)='r') t(i)=18;
      |                     ^
a.cc:33:21: error: 't' was not declared in this scope
   33 |     if(s.at(i)='s') t(i)=19;
      |                     ^
a.cc:34:21: error: 't' was not declared in this scope
   34 |     if(s.at(i)='t') t(i)=20;
      |                     ^
a.cc:35:21: error: 't' was not declared in this scope
   35 |     if(s.at(i)='u') t(i)=21;
      |                     ^
a.cc:36:21: error: 't' was not declared in this scope
   36 |     if(s.at(i)='v') t(i)=22;
      |                     ^
a.cc:37:21: error: 't' was not declared in this scope
   37 |     if(s.at(i)='w') t(i)=23;
      |                     ^
a.cc:38:21: error: 't' was not declared in this scope
   38 |     if(s.at(i)='x') t(i)=24;
      |                     ^
a.cc:39:21: error: 't' was not declared in this scope
   39 |     if(s.at(i)='y') t(i)=25;
      |                     ^
a.cc:40:21: error: 't' was not declared in this scope
   40 |     if(s.at(i)='z') t(i)=26;
      |                     ^
a.cc:41:5: error: 'c' was not declared in this scope
   41 |     c.at(i)=i+1;
      |     ^
a.cc:47:12: error: 't' was not declared in this scope
   47 |         if(t.at(j)<t.at(j-1) && p.at(j) <=p.at(j-1)){
      |            ^
a.cc:47:33: error: 'p' was not declared in this scope
   47 |         if(t.at(j)<t.at(j-1) && p.at(j) <=p.at(j-1)){
      |                                 ^
a.cc:48:14: error: 'c' was not declared in this scope
   48 |           t1=c.at(j);
      |              ^
a.cc:52:14: error: 'c' was not declared in this scope
   52 |           t1=c.at(j);
      |              ^
a.cc:60:5: error: 'cout' was not declared in this scope
   60 |     cout << c.at(i) << endl;
      |     ^~~~
a.cc:60:13: error: 'c' was not declared in this scope
   60 |     cout << c.at(i) << endl;
      |             ^
a.cc:60:24: error: 'endl' was not declared in this scope
   60 |     cout << c.at(i) << endl;
      |                        ^~~~