a little help with uva 11624 Fire!

Правка en1, от 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.

Теги multisource bfs, bfs, uva11624

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский axelabhi 2017-03-21 23:17:46 515 Initial revision (published)