/in/foo.c: In function 'main':
/in/foo.c:48:24: warning: implicit declaration of function 'max' [-Wimplicit-function-declaration]
dp[i][j] = max(dp[i][j], dp[i-1][j] - 1);
^~~
/in/foo.c:55:28: warning: implicit declaration of function 'min' [-Wimplicit-function-declaration]
dp[i][j] = min(M, dp[i][j] + k1);
^~~
/tmp/ccx56zrZ.o: In function `main':
foo.c:(.text.startup+0x241): undefined reference to `max'
foo.c:(.text.startup+0x251): undefined reference to `max'
foo.c:(.text.startup+0x26e): undefined reference to `max'
foo.c:(.text.startup+0x27e): undefined reference to `max'
foo.c:(.text.startup+0x2a0): undefined reference to `min'
foo.c:(.text.startup+0x2ed): undefined reference to `min'
foo.c:(.text.startup+0x305): undefined reference to `min'
collect2: error: ld returned 1 exit status