ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1254. Die Hard

WA7
Posted by rohit 12 Apr 2011 03:18
What's special in test 7 ? I tried all the tests given here and I get right answer.

My algorithm is to use bfs to calculate shortest path from source to each destination. If destination is reachable, source is updated to destination else source remains same.
Anything wrong with my method ?
Re: WA7
Posted by Erop [USU] 2 May 2011 22:47
may be some problems with precision?
Re: WA7
Posted by Velea Alex 26 Aug 2011 01:41
I got the same problem .. i have WA7 ..
I used BFs .. O(n*m*k) with 2 quest .. one for the blocks whose were reached by vertical or orizontal moves ( last move ) and another for those who were reached with diagonal moves (last move counts only again .. )

with this i do not need to use Heap :( but i got a problem .. i triend almoast every test .. and they worked .. but still WA7 .. :(

my prog. it's not written so well ... so i will not post it .. if you think that it will help you .. ask for it : )

i will keep in touch with this thread :-S