(Decode)can some help me to find out where i am going wrong in rectangular recipe problem

here is my solution
https://www.codechef.com/viewsolution/27668779

Hi @tsuraj
You can find the editorial here at