Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(void)
{
    int n;
    scanf("%d",&n);
    char s[100][11];
    int p[100];
    int num[100];
    int i,j;
    for(i=0;i<n;i++){
        gets(s[i]);
        scanf("%d",p[i]);
        n[i]=i+1;
    }
    char char_tmp;int int_tmp,tmp;

    for(i=0;i<n-1;i++){
        for(j=n-1;j>i;j--){
            if(strcmp(s[j-1],s[j])>0){
                strcpy(tmp, s[j-1]);
                strcpy(s[j-1], s[j]);
                strcpy(s[j], tmp);
                int_tmp=p[j-1];
                p[j-1]=p[j];
                p[j]=int_tmp;
                tmp=n[j-1];
                n[j-1]=n[j];
                n[j]=tmp;
        }
    }

    for(i=0;i<n-1;i++){
        for(j=n-1;j>i;j--){
            if(p[j-1]<p[j]){
                tmp=n[j-1];
                n[j]=tmp;
                n[j-1]=n[j];
            }
        }
    }

    for(i=0;i<n;i++){
        printf("%d\n",n[i]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   14 |         gets(s[i]);
      |         ^~~~
      |         fgets
main.c:16:10: error: subscripted value is neither array nor pointer nor vector
   16 |         n[i]=i+1;
      |          ^
main.c:23:24: error: passing argument 1 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion]
   23 |                 strcpy(tmp, s[j-1]);
      |                        ^~~
      |                        |
      |                        int
In file included from main.c:3:
/usr/include/string.h:141:39: note: expected 'char * restrict' but argument is of type 'int'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
main.c:25:30: error: passing argument 2 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion]
   25 |                 strcpy(s[j], tmp);
      |                              ^~~
      |                              |
      |                              int
/usr/include/string.h:141:70: note: expected 'const char * restrict' but argument is of type 'int'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:29:22: error: subscripted value is neither array nor pointer nor vector
   29 |                 tmp=n[j-1];
      |                      ^
main.c:30:18: error: subscripted value is neither array nor pointer nor vector
   30 |                 n[j-1]=n[j];
      |                  ^
main.c:30:25: error: subscripted value is neither array nor pointer nor vector
   30 |                 n[j-1]=n[j];
      |                         ^
main.c:31:18: error: subscripted value is neither array nor pointer nor vector
   31 |                 n[j]=tmp;
      |                  ^
main.c:38:22: error: subscripted value is neither array nor pointer nor vector
   38 |                 tmp=n[j-1];
      |                      ^
main.c:39:18: error: subscripted value is neither array nor pointer nor vector
   39 |                 n[j]=tmp;
      |                  ^
main.c:40:18: error: subscripted value is neither array nor pointer nor vector
   40 |                 n[j-1]=n[j];
      |                  ^
main.c:40:25: error: subscripted value is neither array nor pointer nor vector
   40 |                 n[j-1]=n[j];
      |                         ^
main.c:46:24: error: subscripted value is neither array nor pointer nor vector
   46 |         printf("%d\n",n[i]);
      |                        ^
main.c:49:1: error: expected declaration or statement at end of input
   49 | }
      | ^