Language: C

long M=1e9+7,d[1<<17],i,j;s[222];main(n){for(;~scanf("%d",s-n);n--);for(qsort(s+1,~n,4,"\x8b\7+\6Ð");j++<*s;)d[j]=j;for(;j?:(j=*s,++i<~n);d[j--]%=1e9+7)d[j]=d[j]*i+d[j%s[i+1]];printf("%d",d[j]);}

Compiler output:
main.c:1:27: warning: data definition has no type or storage class
    1 | long M=1e9+7,d[1<<17],i,j;s[222];main(n){for(;~scanf("%d",s-n);n--);for(qsort(s+1,~n,4,"\x8b\7+\6Ð");j++<*s;)d[j]=j;for(;j?:(j=*s,++i<~n);d[j--]%=1e9+7)d[j]=d[j]*i+d[j%s[i+1]];printf("%d",d[j]);}
      |                           ^
main.c:1:27: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
main.c:1:34: error: return type defaults to 'int' [-Wimplicit-int]
    1 | long M=1e9+7,d[1<<17],i,j;s[222];main(n){for(;~scanf("%d",s-n);n--);for(qsort(s+1,~n,4,"\x8b\7+\6Ð");j++<*s;)d[j]=j;for(;j?:(j=*s,++i<~n);d[j--]%=1e9+7)d[j]=d[j]*i+d[j%s[i+1]];printf("%d",d[j]);}
      |                                  ^~~~
main.c: In function 'main':
main.c:1:34: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:48: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | long M=1e9+7,d[1<<17],i,j;s[222];main(n){for(;~scanf("%d",s-n);n--);for(qsort(s+1,~n,4,"\x8b\7+\6Ð");j++<*s;)d[j]=j;for(;j?:(j=*s,++i<~n);d[j--]%=1e9+7)d[j]=d[j]*i+d[j%s[i+1]];printf("%d",d[j]);}
      |                                                ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | long M=1e9+7,d[1<<17],i,j;s[222];main(n){for(;~scanf("%d",s-n);n--);for(qsort(s+1,~n,4,"\x8b\7+\6Ð");j++<*s;)d[j]=j;for(;j?:(j=*s,++i<~n);d[j--]%=1e9+7)d[j]=d[j]*i+d[j%s[i+1]];printf("%d",d[j]);}
main.c:1:48: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | long M=1e9+7,d[1<<17],i,j;s[222];main(n){for(;~scanf("%d",s-n);n--);for(qsort(s+1,~n,4,"\x8b\7+\6Ð");j++<*s;)d[j]=j;for(;j?:(j=*s,++i<~n);d[j--]%=1e9+7)d[j]=d[j]*i+d[j%s[i+1]];printf("%d",d[j]);}
      |                                                ^~~~~
main.c:1:48: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:73: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
    1 | long M=1e9+7,d[1<<17],i,j;s[222];main(n){for(;~scanf("%d",s-n);n--);for(qsort(s+1,~n,4,"\x8b\7+\6Ð");j++<*s;)d[j]=j;for(;j?:(j=*s,++i<~n);d[j--]%=1e9+7)d[j]=d[j]*i+d[j%s[i+1]];printf("%d",d[j]);}
      |                                                                         ^~~~~
main.c:1:145: error: invalid operands to binary % (have 'long int' and 'double')
    1 | long M=1e9+7,d[1<<17],i,j;s[222];main(n){for(;~scanf("%d",s-n);n--);for(qsort(s+1,~n,4,"\x8b\7+\6Ð");j++<*s;)d[j]=j;for(;j?:(j=*s,++i<~n);d[j--]%=1e9+7)d[j]=d[j]*i+d[j%s[i+1]];printf("%d",d[j]);}
      |                                                                                                                                           ~~~~~~^~~~~~~
      |                                                                                                                                            |         |
      |                                                                                                                                            long int  double
main.c:1:177: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | long M=1e9+7,d[1<<17],i,j;s[222];main(n){for(;~scanf("%d",s-n);n--);for(qsort(s+1,~n,4,"\x8b\7+\6Ð");j++<*s;)d[j]=j;for(;j?:(j=*s,++i<~n);d[j--]%=1e9+7)d[j]=d[j]*i+d[j%s[i+1]];printf("%d",d[j]);}
      |                                                                                                                                                                                 ^~~~~~
main.c:1:177: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:177: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:177: note: include '<stdio.h>' or provide a declaration of 'printf'