Problem lemonade2
User popperoni
Submission Time 2024-12-14 14:48:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lemonade2.cpp: In function ‘long long int ans(long long int, long long int, long long int)’:
lemonade2.cpp:29:18: error: ‘C’ was not declared in this scope
29 | if(mem[i][A][B][C]!=-1)return mem[i][A][B][C];
| ^
lemonade2.cpp:32:23: error: ‘C’ was not declared in this scope
32 | return mem[i][A][B][C]=min({ans(i+1,A+b[i],B),ans(i+1,A,B+b[i])+1,ans(i+1,A,B)+1});
| ^
lemonade2.cpp:34:23: error: ‘C’ was not declared in this scope
34 | return mem[i][A][B][C]=min({ans(i+1,A+b[i],B)+1,ans(i+1,A,B+b[i]),ans(i+1,A,B)+1});
| ^
lemonade2.cpp:36:23: error: ‘C’ was not declared in this scope
36 | return mem[i][A][B][C]=min({ans(i+1,A+b[i],B)+1,ans(i+1,A,B+b[i])+1,ans(i+1,A,B)});
| ^