Problem | feast |
---|---|
User | Rolo |
Submission Time | 2024-04-13 08:20:02 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
feast.cpp: In function ‘int main()’:
feast.cpp:31:41: error: expected ‘;’ before ‘dp’
31 | dp[i][0] = max(dp[i-1][0],dp[i-1][1])
| ^
| ;
32 | dp[i][1] = max({dp[i-1][1].first + a[i],dp[i-1][1].second},{dp[i-1][1].first + a[i]-mid,dp[i-1][1].second+1});
| ~~
feast.cpp:32:62: error: expected primary-expression before ‘,’ token
32 | dp[i][1] = max({dp[i-1][1].first + a[i],dp[i-1][1].second},{dp[i-1][1].first + a[i]-mid,dp[i-1][1].second+1});
| ^
feast.cpp:32:63: error: expected primary-expression before ‘{’ token
32 | dp[i][1] = max({dp[i-1][1].first + a[i],dp[i-1][1].second},{dp[i-1][1].first + a[i]-mid,dp[i-1][1].second+1});
| ^
feast.cpp:32:112: error: expe