The Code is giving TLE in three test cases,how can i optimize the code.
It’s saved at:https://ide.codingblocks.com/s/214959
Mixture Problem from DP section
@Naveen8377
Corrected Code: here
-
Line 21:
for(int k=i;k<=j;k++)
Correction:for(int k=i;k<j;k++)
-
Also, no test cases, remove
while(t--)
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.