Problem | beareatrabbit |
---|---|
User | devomega07 |
Submission Time | 2023-08-17 23:23:26 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
beareatrabbit.cpp: In function ‘int main()’:
beareatrabbit.cpp:47:58: error: expected ‘;’ before ‘for’
47 | dp[3] = max({arr[1]+arr[3], arr[1], arr[2], arr[3],0ll})
| ^
| ;
48 | for(int i=4; i<=n; ++i)
| ~~~
beareatrabbit.cpp:48:15: error: ‘i’ was not declared in this scope
48 | for(int i=4; i<=n; ++i)
| ^
beareatrabbit.cpp:49:50: error: expected primary-expression before ‘)’ token
49 | dp[i] = max({dp[i-2] + arr[i], dp[i-1], arr[i]});
| ^