foo.c: In function 'main':
foo.c:14:20: warning: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
f[i][j]=s[i][j]+min(f[i+1][j],f[i][j-1]);
^~~
main
foo.c:5:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
^~~~~~~~~~~~~~~~~~~
foo.c:8:4: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&s[i][j]);
^~~~~~~~~~~~~~~~~~~~
/tmp/ccKWy7vh.o: In function `main':
foo.c:(.text.startup+0x1a1): undefined reference to `min'
foo.c:(.text.startup+0x210): undefined reference to `min'
foo.c:(.text.startup+0x279): undefined reference to `min'
collect2: error: ld returned 1 exit status