Problem visitingsingapore
User bribritt
Submission Time 2023-08-11 15:29:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

visitingsingapore.cpp: In function ‘int32_t main()’:
visitingsingapore.cpp:12:53: error: ‘B’ was not declared in this scope
12 | dp[i][j][0]=max(dp[i-1][j][0],dp[i-1][j][1]-(i+j)*B);
| ^
visitingsingapore.cpp:13:53: error: ‘A’ was not declared in this scope
13 | if(t[j]==s[i]) {dp[i][j][1]=max(dp[i-1][j-1][0]+2*A+(i+j-1)*B,dp[i-1][j-1][1])+v[s[i]]; ans=max(ans,dp[i][j][1]);
| ^
visitingsingapore.cpp:14:3: error: expected ‘}’ before ‘else’
14 | else dp[i][j][1]=-121020101210;
| ^~~~
visitingsingapore.cpp:13:18: note: to match this ‘{’
13 | if(t[j]==s[i]) {dp[i][j][1]=max(dp[i-1][j-1][0]+2*A+(i+j-1)*B,dp[i-1][j-1][1])+v[s[i]]; ans=max(ans,dp[i][j][1]);
| ^