foo.c: In function 'main':
foo.c:17: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:8:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
^~~~~~~~~~~~~~~~~~~
foo.c:11:4: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&s[i][j]);
^~~~~~~~~~~~~~~~~~~~
/tmp/cc4bG2le.o: In function `main':
foo.c:(.text.startup+0x196): undefined reference to `min'
foo.c:(.text.startup+0x1ff): undefined reference to `min'
foo.c:(.text.startup+0x25c): undefined reference to `min'
collect2: error: ld returned 1 exit status