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 1130. Nikifor's Walk

Answer for test
Posted by TruMen [Lviv NU][Timus Battle] 25 Sep 2016 03:11
What is the answer for test:
4 10
0 10
10 0
1 1
5 -5
Re: Answer for test
Posted by Jane Soboleva 25 Sep 2016 03:47
YES
+--+
Re: Answer for test
Posted by TruMen [Lviv NU][Timus Battle] 26 Sep 2016 05:18
But after three steps P = (0,10) - (10,0) - (1,1) = (-11,9);
Distance to Z = (0,0) equal to sqrt(11*11+9*9) = sqrt(202) = 14.2126 > sqrt(2)*10 = 14.1421
Re: Answer for test
Posted by Jane Soboleva 26 Sep 2016 13:19
Hmm, well, you might be onto something!
The thing is, my program doesn't have "WRONG ANSWER" in it at all, and now that i look at it again i don't really remember why :)
You can try to email one of the admins about this.

Edit @below: ohhh right. By now i already forgot about this detail. Thanks!

Edited by author 26.09.2016 16:04
Re: Answer for test
Posted by bsu.mmf.team 26 Sep 2016 14:36
"...and she wants him to move off her not farther than by the square root of 2 multiplied by L (sqrt(2)L)
IN THE END OF HIS WALK."

Your case describes the distance after 3 steps, not 4. Nikifor is allowed to move farther in the middle of the  travel.

Edited by author 26.09.2016 14:36

Edited by author 26.09.2016 14:36
Re: Answer for test
Posted by Felix_Mate 26 Sep 2016 21:52
My AC give:
YES
+-++