/ Vijos /

记录详情

Compile Error

foo.cpp:1:1: error: 'include' does not name a type
 include <iostream> 
 ^
foo.cpp: In function 'int dfs(int, int)':
foo.cpp:8:133: error: 'max' was not declared in this scope
 if(n<0) return -9999999; if(m*n==0) return 0; if(f[m][n]!=0) return f[m][n]; return f[m][n]=max(dfs(m-1,n),dfs(m-1,n-v[m])+v[m]*p[m]); } int main() { int n,m; cin>>n>>m;
                                                                                                                                     ^
foo.cpp: In function 'int main()':
foo.cpp:8:160: error: 'cin' was not declared in this scope
 if(n<0) return -9999999; if(m*n==0) return 0; if(f[m][n]!=0) return f[m][n]; return f[m][n]=max(dfs(m-1,n),dfs(m-1,n-v[m])+v[m]*p[m]); } int main() { int n,m; cin>>n>>m;
                                                                                                                                                                ^
foo.cpp:11:1: error: 'cout' was not declared in this scope
 cout<<dfs(m,n);
 ^
foo.cpp: In function 'int dfs(int, int)':
foo.cpp:8:136: warning: control reaches end of non-void function [-Wreturn-type]
 if(n<0) return -9999999; if(m*n==0) return 0; if(f[m][n]!=0) return f[m][n]; return f[m][n]=max(dfs(m-1,n),dfs(m-1,n-v[m])+v[m]*p[m]); } int main() { int n,m; cin>>n>>m;
                                                                                                                                        ^

信息

递交者
类型
递交
题目
P1317 开心的金明
语言
C++
递交时间
2016-07-15 14:46:43
评测时间
2016-07-15 14:46:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes