Problem | candymountain_ex |
---|---|
User | asbx |
Submission Time | 2023-12-04 13:21:49 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
candymountain_ex.cpp:5:7: error: expected constructor, destructor, or type conversion before ‘(’ token
5 | memset(dp,-1,sizeof(dp));
| ^
candymountain_ex.cpp:6:13: error: ‘long long int dp(long long int)’ redeclared as different kind of entity
6 | int dp(int p){
| ^
candymountain_ex.cpp:4:22: note: previous declaration ‘long long int dp [100100]’
4 | int pebbles[100100], dp[100100];
| ^~
candymountain_ex.cpp: In function ‘long long int dp(long long int)’:
candymountain_ex.cpp:10:13: error: ‘k’ was not declared in this scope
10 | else if(p<=k){
| ^
candymountain_ex.cpp:16:16: error: ‘dp’ cannot be used as a function
16 | z=max(z,dp(i));
| ^
candymountain_ex.cpp:18:15: error: ‘pebbles’ cannot be used as a function
18 | z+=pebbles(p);
| ^
candymountain_ex.cpp: In function ‘int main()’: