http://codeforces.me/contest/540/problem/C my submission-11373394
Getting TLE everytime om 14th one in this i am first checking that whether destination is reachable from source.then if destination is intact we look for sorroundings tiles if there is any one intact tiles then we switch to that position and then return back to destination