a little help with uva 11624 Fire!

Revision en1, by axelabhi, 2017-03-21 23:17:46

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.

Tags multisource bfs, bfs, uva11624

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English axelabhi 2017-03-21 23:17:46 515 Initial revision (published)