Problem lemonade2
User popperoni
Submission Time 2024-12-14 14:47:54
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, long long int)’:
lemonade2.cpp:29:19: error: invalid types ‘long long int[long long int]’ for array subscript
29 | if(mem[i][A][B][C]!=-1)return mem[i][A][B][C];
| ^
lemonade2.cpp:29:46: error: invalid types ‘long long int[long long int]’ for array subscript
29 | if(mem[i][A][B][C]!=-1)return mem[i][A][B][C];
| ^
lemonade2.cpp:32:24: error: invalid types ‘long long int[long long int]’ for array subscript
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:32:47: error: too few arguments to function ‘long long int ans(long long int, long long int, long long int, long long int)’
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});
|