Deepak and his journey-greedy problem

https://ide.codingblocks.com/s/86871 I’m not able to find error in my code… please tell me the right approach. thank you.


you can refer this