SHOPTRIP- Stuck in this problem

Problem- https://www.codechef.com/problems/SHOPTRIP
Can anyone debug my code??
https://ide.codingblocks.com/s/173331