/in/foo.c:7:5: error: variably modified 'f' at file scope
int f[MAXM][MAXN];
^
/in/foo.c:7:5: error: variably modified 'f' at file scope
/in/foo.c:8:5: error: variably modified 'w' at file scope
int w[MAXM][MAXN];
^
/in/foo.c:8:5: error: variably modified 'w' at file scope
/in/foo.c:10:11: error: initializer element is not constant
int ans = INF, p;
^~~
/in/foo.c: In function 'main':
/in/foo.c:46:23: warning: implicit declaration of function 'min' [-Wimplicit-function-declaration]
f[i][j] = min(f[i][j], f[i][j - 1] + w[i][j]);
^~~