Plz tell what is my code missing


code not getting accepted in spoj
plz do not correct the code just tell me the error.
Thank you

Hello @Abhay-Chauhan-1546158815521966 you are doing painter partition paroblem right?

No Spoj Eko problem that is mentioned next to the partition problem

Hello @Abhay-Chauhan-1546158815521966 i dont have access to your portal you have to share the link for that.

problem link: https://www.spoj.com/problems/EKO/

My naswer link:https://ide.codingblocks.com/s/390108

Hello @Abhay-Chauhan-1546158815521966 i have corrected your code and now it is passing every test case:
you can try by submitting it there :


i have commented the mistaked.
if you have any doubt you can ask here:
Happy Learning!!