Spoj mixture problem


on submitting it says wrong answer
i have used dp approach for sum as well as opposed to normal approach of prateek bhaiya.

Hello @Krishna-Singh-2678805765519156

There were only slight error in your code.
You have NOT initialized the summ matrix
and
In the implementation of sum function, (if summ[st][en] == -1) then make summ[st][en] = 0;
else -1 will be added to the summ[st][en]

I have modified the code Line 15 and and Line 41