Wrong Answer in CENS20F

https://www.codechef.com/viewsolution/37007493
Can someone suggest me where is mistake in my code? I used BFS and at even distance converted all nodes to 0 and also maintained a visited array to not check it in the next query. Any Test case or help will be highly appreciated. Thanks in advance…

1 Like