Problem discharging
User ptk8627
Submission Time 2023-03-15 14:49:18
Score 0
Max Time N/A
Max Memory N/A

Compile Error

discharging.cpp: In function ‘int main()’:
discharging.cpp:16:25: error: expected ‘;’ before ‘for’
16 | maxT = max(maxT, t[i])
| ^
| ;
17 | for(ll j = 1; j <= i; j++) dp[i] = min(dp[i], dp[j - 1] + maxT * (n - j + 1));
| ~~~
discharging.cpp:17:17: error: ‘j’ was not declared in this scope
17 | for(ll j = 1; j <= i; j++) dp[i] = min(dp[i], dp[j - 1] + maxT * (n - j + 1));
| ^