Problem | 01knapsack |
---|---|
User | asbx |
Submission Time | 2023-11-15 15:57:31 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
01knapsack.cpp: In function ‘int main()’:
01knapsack.cpp:25:2: error: ‘memset’ was not declared in this scope
25 | memset(DP,-1,sizeof(DP));
| ^~~~~~
01knapsack.cpp:2:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
1 | #include <iostream>
+++ |+#include <cstring>
2 |
In file included from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from 01knapsack.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h: In instantiation of ‘constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]’:
01knapsack.cpp:14:80: required from here
/usr/include/c++/9/bits/stl_algobase.h:271:17: error: ‘__comp’ cannot be used as a function
271 | if (__comp(__a, __b))