Problem | feast |
---|---|
User | Rolo |
Submission Time | 2024-04-13 08:25:24 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
feast.cpp: In function ‘int main()’:
feast.cpp:35:42: error: expected ‘)’ before ‘{’ token
35 | if((max(dp[n][0],dp[n][1]).second >= k)
| ~ ^
| )
36 | {
| ~
feast.cpp:43:2: error: expected primary-expression before ‘}’ token
43 | }
| ^
feast.cpp:49:41: error: expected ‘;’ before ‘dp’
49 | dp[i][0] = max(dp[i-1][0],dp[i-1][1])
| ^
| ;
50 | dp[i][1] = max({dp[i-1][1].first + a[i],dp[i-1][1].second},{dp[i-1][1].first + a[i]-lo,dp[i-1][1].second+1});
| ~~
feast.cpp:50:62: error: expected primary-expression before ‘,’ token
50 | dp[i][1] = max({dp[i-1][1].first + a[i],dp[i-1][1].second},{dp[i-1][1].first + a[i]-lo,dp[i-1][1].