|
|
вернуться в форумПоказать все сообщения Спрятать все сообщения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. 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... 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 I think z must be sqrt(2)/2 And real is not so exact, use double or extended 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(pi/4) = sqrt(2)/2 but cos(45) is something strange. i didn't know this. thank you very much cos(45) - but you must change it into cos(pi/4)- degree must be in radian^) |
|
|