axelabhi's blog

By axelabhi, history, 8 years ago, In English

i was trying to do this question using a single bfs. I push the location of joey and all the fires in the queue and if joey reaches the corner i will get my ans. I think it is correct because if joey has moved through a path then there is no point in fire following after him . I tried all the test case in UDebug and it works fine on them but I am getting wrong answer on Uva judge. here is the link to my code https://ideone.com/qLt4eF any help would be appreciated thank you.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it