Escape Plan

Not getting on which test case my code is failing?

Problem Link: Contest Page | CodeChef
Solution Link: Solution: 55377473 | CodeChef