Need Hint regarding Edge Case in the problem: Charge Scheduling [CHARGE]

Link to problem: CodeChef: Practical coding for everyone

I have written the code 4 this problem. But i am getting 2 subtasks wrong. I think its because of some edge cases probbly. Hint about edge case will be appreciated. Dont need the code. anyway the contest is unrated 4 me just wanted to solve it. I hve been stuck 4 some time.
Thanks

Share your code will try to debug it