Language: C

int main(void){
	while(scanf("%s %d",s[n],&page[n])!=EOF){
		dic[n][0]=n;dic[n][1]=999;

		look=first;prev=-1;
		while(look!=n){
			dex=dic[look][0];
			if(strcmp(s[n],s[dex])<0 || (strcmp(s[n],s[dex])==0 && page[n]<page[dex]) ){
				dic[n][1]=look;
				if(prev<0){first=n;}
				else{dic[prev][1]=n;}
				break;
			}
			else{
				if(dic[look][1]>111){
					dic[look][1]=n;
					break;
				}
				else{
					prev=look;
					look=dic[look][1];
				}
			}
		}
		n++;
	}

	i=first;
	while(i<111){
		if(strcmp(word,s[dic[i][0]])!=0){
			strcpy(word,s[dic[i][0]]);
			if(i!=first)printf("\n");
			printf("%s\n",word);
			printf("%d",page[dic[i][0]]);
		}
		else{
			printf(" %d",page[dic[i][0]]);
		}

		i=dic[i][1];
	}

	printf("\n");

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:2:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    2 |         while(scanf("%s %d",s[n],&page[n])!=EOF){
      |               ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:2:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 |         while(scanf("%s %d",s[n],&page[n])!=EOF){
      |               ^~~~~
main.c:2:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:29: error: 's' undeclared (first use in this function)
    2 |         while(scanf("%s %d",s[n],&page[n])!=EOF){
      |                             ^
main.c:2:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:2:31: error: 'n' undeclared (first use in this function)
    2 |         while(scanf("%s %d",s[n],&page[n])!=EOF){
      |                               ^
main.c:2:35: error: 'page' undeclared (first use in this function)
    2 |         while(scanf("%s %d",s[n],&page[n])!=EOF){
      |                                   ^~~~
main.c:2:45: error: 'EOF' undeclared (first use in this function)
    2 |         while(scanf("%s %d",s[n],&page[n])!=EOF){
      |                                             ^~~
main.c:2:45: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:3:17: error: 'dic' undeclared (first use in this function)
    3 |                 dic[n][0]=n;dic[n][1]=999;
      |                 ^~~
main.c:5:17: error: 'look' undeclared (first use in this function)
    5 |                 look=first;prev=-1;
      |                 ^~~~
main.c:5:22: error: 'first' undeclared (first use in this function)
    5 |                 look=first;prev=-1;
      |                      ^~~~~
main.c:5:28: error: 'prev' undeclared (first use in this function)
    5 |                 look=first;prev=-1;
      |                            ^~~~
main.c:7:25: error: 'dex' undeclared (first use in this function)
    7 |                         dex=dic[look][0];
      |                         ^~~
main.c:8:28: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    8 |                         if(strcmp(s[n],s[dex])<0 || (strcmp(s[n],s[dex])==0 && page[n]<page[dex]) ){
      |                            ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strcmp'
  +++ |+#include <string.h>
    1 | int main(void){
main.c:28:9: error: 'i' undeclared (first use in this function)
   28 |         i=first;
      |         ^
main.c:30:27: error: 'word' undeclared (first use in this function)
   30 |                 if(strcmp(word,s[dic[i][0]])!=0){
      |                           ^~~~
main.c:31:25: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
   31 |                         strcpy(word,s[dic[i][0]]);
      |                         ^~~~~~
main.c:31:25: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:31:25: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
main.c:31:25: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:32:37: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   32 |                         if(i!=first)printf("\n");
      |                                     ^~~~~~
main.c:32:37: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:32:37: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:32:37: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:33:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   33 |                         printf("%s\n",word);
      |                         ^~~~~~
main.c:33:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:37:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   37 |                         printf(" %d",page[dic[i][0]]);
      |                         ^~~~~~
main.c:37:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:43:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   43 |         printf("\n");
      |         ^~~~~~
main.c:43:9: note: include '<stdio.h>' or provide a declaration of 'printf'