HDELIVERY: need help

can anyone check my solution. what’s wrong with it…http://www.codechef.com/viewsolution/2507992
PROBLEM: http://www.codechef.com/problems/HDELIVER/

RE is being caused due to input of n & m which are outside the number of test case loop…which causes n & m to remain constant throughout…correct that and RE will not come…but it is giving a WA now…rethink on ur algo…!!!

HINT: DFS…hope this helps…:slight_smile:

1 Like

thanks… :slight_smile:

glad could help…:slight_smile:

//