Problem coke
User FIips
Submission Time 2025-01-29 20:01:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

coke.cpp: In function ‘int32_t main()’:
coke.cpp:46:85: error: expected ‘,’ or ‘;’ before ‘alert’
46 | int prev = max(dp[i - 1][j - curcoke][0].first, dp[i - 1][j - curcoke][1].first)alert = dp[i - 1][j - curcoke].second;
| ^~~~~
coke.cpp:47:18: error: ‘alert’ was not declared in this scope; did you mean ‘dalert’?
47 | int dalert = alert + curcoke;
| ^~~~~
| dalert
coke.cpp:49:17: error: request for member ‘first’ in ‘dp[i][j]’, which is of non-class type ‘std::pair<long long int, long long int> [2]’
49 | if(dp[i][j].first < prev + cursugar * alert) {
| ^~~~~
coke.cpp:50:49: error: assigning to an array from an initializer list
50 | dp[i][j] = {prev + cursugar * alert, dalert};
| ^
coke.cpp:53:22: e