记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:5:5: error: 'cin' was not declared in this scope
     cin>>n>>m;
     ^~~
/in/foo.cc:5:5: note: suggested alternative:
In file included from /in/foo.cc:1:0:
/usr/include/c++/6/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^~~
/in/foo.cc:11:55: error: 'max' was not declared in this scope
    if(j>=W[i])   f[i][j]=max(f[i][j],f[i][j-W[i]]+V[i]);
                                                       ^
/in/foo.cc:11:55: note: suggested alternative:
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algobase.h:265:5: note:   'std::max'
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~

信息

递交者
类型
递交
题目
完全背包问题
题目数据
下载
语言
C++
递交时间
2019-03-16 10:58:10
评测时间
2019-03-16 10:58:10
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes