Problem beareatrabbit
User Yifei1234
Submission Time 2023-05-18 09:48:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

beareatrabbit.cpp: In function ‘int main()’:
beareatrabbit.cpp:11:20: error: ‘max’ cannot be used as a function
11 | dp[1]=max(a[0],a[1]);
| ^
beareatrabbit.cpp:12:20: error: ‘max’ cannot be used as a function
12 | dp[1]=max(0ll,dp[1]);
| ^
beareatrabbit.cpp:13:20: error: ‘max’ cannot be used as a function
13 | dp[0]=max(dp[0],0ll);
| ^
beareatrabbit.cpp:15:32: error: ‘max’ cannot be used as a function
15 | dp[i]=max(dp[i-1],a[i]+dp[i-2]);
| ^
beareatrabbit.cpp:16:19: error: ‘max’ cannot be used as a function
16 | ans=max(ans,dp[i]);
| ^