Language: C

#define r(a,i)for(i=0;i<a;i++)
#define s (scanf("%d",&w),w);
#define c(a,b)a=a<b?a:b
d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}

Compiler output:
main.c:4:1: warning: data definition has no type or storage class
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      | ^
main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:4:8: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |        ^
main.c:4:15: error: return type defaults to 'int' [-Wimplicit-int]
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |               ^~~~
main.c: In function 'main':
main.c:4:15: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'w' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:4:33: error: 'sm' undeclared (first use in this function); did you mean 'm'?
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |                                 ^~
      |                                 m
main.c:4:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:36: error: implicit declaration of function 'sr'; did you mean 'r'? [-Wimplicit-function-declaration]
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |                                    ^~
      |                                    r
main.c:4:43: error: expected ';' before 'd'
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |                                           ^
      |                                           ;
main.c:4:78: error: expected ';' before 'p'
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |                                                                              ^
      |                                                                              ;
main.c:4:105: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |                                                                                                         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | #define r(a,i)for(i=0;i<a;i++)
main.c:4:105: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |                                                                                                         ^~~~~~
main.c:4:105: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:123: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |                                                                                                                           ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | #define r(a,i)for(i=0;i<a;i++)
main.c:4:123: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
      |                                                                                                                           ^~~~
main.c:4:123: note: include '<stdlib.h>' or provide a declaration of 'exit'