foo.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
include <stdio.h>
^
foo.c:4:8: error: 'MAXT' undeclared here (not in a function)
int dp[MAXT+1];
^
foo.c: In function 'main':
foo.c:10:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
scanf("%d%d",&t,&m);
^
foo.c:10:1: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:11:1: error: 'for' loop initial declarations are only allowed in C99 mode
for(int i=0;i<m;i++) { scanf("%d%d",&time,&value); for(int j=t;j>=time;j--)
^
foo.c:11:1: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c:11:52: error: 'for' loop initial declarations are only allowed in C99 mode
for(int i=0;i<m;i++) { scanf("%d%d",&time,&value); for(int j=t;j>=time;j--)
^
foo.c:16:1: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
printf("%d\n",dp[t]);
^
foo.c:16:1: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]