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 1364. LaraKiller

I found some ambiguity of LaraKiller(1364)
Posted by semiconductor 24 Apr 2005 20:15
The problem states:
 "[output]The graves shall be sorted by the distance that Lara will have to run from this grave to the cemetry entrance."
But in the sample output:
####
5 2
5 1
4 1
3 1
2 1
2 2
2 3
3 3
4 3
####
Clearly (2,1) is the nearest grave to entrace (1,1), but it appears in the middle !
Another thing is: (4,3) has not been digged by the time Lara is detected. So Lara shouldn't have time to be able to be (4,3). But (4,3) is in the sample output.
I think before Lara is detected, she does a snake shaped traversal( (1,1)->(1,2)->(1,3)->(1,4)->(2,4)->... ), am I right?
And what is the right interpretation of this problem, please ?
Re: I found some ambiguity of LaraKiller(1364)
Posted by Pavel Tolstikov 25 Apr 2005 00:06
Lara runs through the underground passage she dugged before.
And "graves shall be sorted by the distance" through this passage. As you can see output is a part of passage.

Lara is detected only then she stoled treasure.

Lara does a right spiral traversal.
Re: I found some ambiguity of LaraKiller(1364)
Posted by semiconductor 26 Apr 2005 17:58
Thanks Pavel, now I got ac. This problem is pretty easy after one figures out what it means