Language: C++

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