Problem eexploration
User hwy
Submission Time 2023-07-01 18:20:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

eexploration.cpp: In function ‘int dp(int)’:
eexploration.cpp:12:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | if (memo[health] != -1)
| ^
eexploration.cpp:13:21: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
13 | return memo[health];
| ~~~~~~~~~~~^
| |
| int*
eexploration.cpp:19:24: error: incompatible types in assignment of ‘int’ to ‘int [5000000]’
19 | return memo[health] = ans;
| ^~~
eexploration.cpp: In function ‘int main()’:
eexploration.cpp:30:16: error: no matching function for call to ‘std::vector<std::vector<int> >::push_back(int&)’
30 | v.push_back(a);
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/includ