HDELIVERY: need help

can anyone check my solution. what’s wrong with it…CodeChef: Practical coding for everyone
PROBLEM: HDELIVER Problem - CodeChef

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: