/ Vijos /

记录详情

Compile Error

foo.cpp:1:1: error: 'include' does not name a type
 include <cstdio> include <algorithm> define MAX_T 1100 define MAX_M 150
 ^
foo.cpp:3:8: error: 'MAX_T' was not declared in this scope
 int dp[MAX_T],T,M;
        ^
foo.cpp:4:7: error: 'MAX_M' was not declared in this scope
 int v[MAX_M],w[MAX_M];
       ^
foo.cpp:4:16: error: 'MAX_M' was not declared in this scope
 int v[MAX_M],w[MAX_M];
                ^
foo.cpp: In function 'int main()':
foo.cpp:6:19: error: 'scanf' was not declared in this scope
 scanf("%d%d",&T,&M);
                   ^
foo.cpp:8:15: error: 'w' was not declared in this scope
 scanf("%d%d",&w[i],&v[i]);
               ^
foo.cpp:8:21: error: 'v' was not declared in this scope
 scanf("%d%d",&w[i],&v[i]);
                     ^
foo.cpp:11:20: error: 'w' was not declared in this scope
 for(int j = T;j >= w[i];--j){
                    ^
foo.cpp:12:1: error: 'dp' was not declared in this scope
 dp[j] = max(dp[j],dp[j - w[i]] + v[i]);
 ^
foo.cpp:12:34: error: 'v' was not declared in this scope
 dp[j] = max(dp[j],dp[j - w[i]] + v[i]);
                                  ^
foo.cpp:12:38: error: 'max' was not declared in this scope
 dp[j] = max(dp[j],dp[j - w[i]] + v[i]);
                                      ^
foo.cpp:15:15: error: 'dp' was not declared in this scope
 printf("%d\n",dp[T]);
               ^
foo.cpp:15:20: error: 'printf' was not declared in this scope
 printf("%d\n",dp[T]);
                    ^

信息

递交者
类型
递交
题目
P1104 采药
语言
C++
递交时间
2015-11-01 21:15:19
评测时间
2015-11-01 21:15:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes