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 1413. Mars Jumper

Probably tests are wrong...
Posted by Burunduk1 29 Oct 2005 15:16
I've sent two solutions.
On the test one million of '1'

the first one outputs:
-707106.7811865476 -707106.7811865476

the second one outputs:
-707106.7811865475 -707106.7811865475

Of course both solutions get AC.
Re: Probably tests are wrong...
Posted by Alexandrov Sergey 1 Nov 2005 03:22
Well, I've got two different solutions for this problem too. BUT!

on the testcase one million of '1'
the first one outputs:
-707106.7811914912

and the second (!)
-11992.5310089238

both AC..
I think the difference is very big...
Re: Probably tests are wrong...
Posted by Akshin Salimov 9 Jan 2006 02:34
Mine outputs exactly the same as
Sergey's  -707106.7811914912 BUT I HAVE WA#2! WHY!?

Here is my code:

[code deleted]

Edited by moderator 22.02.2006 22:07
Re: Probably tests are wrong...
Posted by Victor Barinov (TNU) 9 Jan 2006 13:24
I think z must be sqrt(2)/2
And real is not so exact, use double or extended
Re: Probably tests are wrong...
Posted by botl_ayhan 12 Jan 2006 22:32
there is something strange i got WA with cos(45) but when i changen it to sqrt(2)/2 i got AC:

[code deleted]

Edited by moderator 22.02.2006 22:08
cos(45) ???
Posted by wwwwww 12 Jan 2006 23:49
cos(pi/4) = sqrt(2)/2
but cos(45) is something strange.
Re: cos(45) ???
Posted by botl_ayhan 13 Jan 2006 09:48
i didn't know this. thank you very much
Re: cos(45) ???
Posted by Koryakov Anton_ghost_Anigus 15 Feb 2006 22:47
cos(45) - but you must change it into cos(pi/4)- degree must be in radian^)