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(i)=1;
    if(S.at(0)='b') t(i)=2;
    if(S.at(0)='c') t(i)=3;
    if(S.at(0)='d') t(i)=4;
    if(S.at(0)='e') t(i)=5;
    if(S.at(0)='f') t(i)=6;
    if(S.at(0)='g') t(i)=7;
    if(S.at(0)='h') t(i)=8;
    if(S.at(0)='i') t(i)=9;
    if(S.at(0)='j') t(i)=10;
    if(S.at(0)='k') t(i)=11;
  	if(S.at(0)='l') t(i)=12;
    if(S.at(0)='n') t(i)=13;
    if(S.at(0)='m') t(i)=14;
    if(S.at(0)='o') t(i)=15;
    if(S.at(0)='p') t(i)=16;
    if(S.at(0)='q') t(i)=17;
    if(S.at(0)='r') t(i)=18;
    if(S.at(0)='s') t(i)=19;
    if(S.at(0)='t') t(i)=20;
    if(S.at(0)='u') t(i)=21;
    if(S.at(0)='v') t(i)=22;
    if(S.at(0)='w') t(i)=23;
    if(S.at(0)='x') t(i)=24;
    if(S.at(0)='y') t(i)=25;
    if(S.at(0)='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 '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(i)=1;
      |                     ^
a.cc:14:21: error: 't' was not declared in this scope
   14 |     if(S.at(0)='b') t(i)=2;
      |                     ^
a.cc:15:21: error: 't' was not declared in this scope
   15 |     if(S.at(0)='c') t(i)=3;
      |                     ^
a.cc:16:21: error: 't' was not declared in this scope
   16 |     if(S.at(0)='d') t(i)=4;
      |                     ^
a.cc:17:21: error: 't' was not declared in this scope
   17 |     if(S.at(0)='e') t(i)=5;
      |                     ^
a.cc:18:21: error: 't' was not declared in this scope
   18 |     if(S.at(0)='f') t(i)=6;
      |                     ^
a.cc:19:21: error: 't' was not declared in this scope
   19 |     if(S.at(0)='g') t(i)=7;
      |                     ^
a.cc:20:21: error: 't' was not declared in this scope
   20 |     if(S.at(0)='h') t(i)=8;
      |                     ^
a.cc:21:21: error: 't' was not declared in this scope
   21 |     if(S.at(0)='i') t(i)=9;
      |                     ^
a.cc:22:21: error: 't' was not declared in this scope
   22 |     if(S.at(0)='j') t(i)=10;
      |                     ^
a.cc:23:21: error: 't' was not declared in this scope
   23 |     if(S.at(0)='k') t(i)=11;
      |                     ^
a.cc:24:25: error: 't' was not declared in this scope
   24 |         if(S.at(0)='l') t(i)=12;
      |                         ^
a.cc:25:21: error: 't' was not declared in this scope
   25 |     if(S.at(0)='n') t(i)=13;
      |                     ^
a.cc:26:21: error: 't' was not declared in this scope
   26 |     if(S.at(0)='m') t(i)=14;
      |                     ^
a.cc:27:21: error: 't' was not declared in this scope
   27 |     if(S.at(0)='o') t(i)=15;
      |                     ^
a.cc:28:21: error: 't' was not declared in this scope
   28 |     if(S.at(0)='p') t(i)=16;
      |                     ^
a.cc:29:21: error: 't' was not declared in this scope
   29 |     if(S.at(0)='q') t(i)=17;
      |                     ^
a.cc:30:21: error: 't' was not declared in this scope
   30 |     if(S.at(0)='r') t(i)=18;
      |                     ^
a.cc:31:21: error: 't' was not declared in this scope
   31 |     if(S.at(0)='s') t(i)=19;
      |                     ^
a.cc:32:21: error: 't' was not declared in this scope
   32 |     if(S.at(0)='t') t(i)=20;
      |                     ^
a.cc:33:21: error: 't' was not declared in this scope
   33 |     if(S.at(0)='u') t(i)=21;
      |                     ^
a.cc:34:21: error: 't' was not declared in this scope
   34 |     if(S.at(0)='v') t(i)=22;
      |                     ^
a.cc:35:21: error: 't' was not declared in this scope
   35 |     if(S.at(0)='w') t(i)=23;
      |                     ^
a.cc:36:21: error: 't' was not declared in this scope
   36 |     if(S.at(0)='x') t(i)=24;
      |                     ^
a.cc:37:21: error: 't' was not declared in this scope
   37 |     if(S.at(0)='y') t(i)=25;
      |                     ^
a.cc:38:21: error: 't' was not declared in this scope
   38 |     if(S.at(0)='z') t(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;
      |                        ^~~~