/ Vijos /

记录详情

Compile Error

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]

信息

递交者
类型
递交
题目
P1104 采药
语言
C
递交时间
2015-12-25 17:21:36
评测时间
2015-12-25 17:21:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes