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 1265. Mirror

WA #8
Posted by Lightweight! Lightweight baby! 10 Aug 2004 03:12
I get WA #8 and I suppose it's because of the precision.
I tried rotating everything so that the mirror becomes (0,0) -> (L,0) actually using sin and cos and got WA #8.
I tried finding out the relative coordonates without actually using rotations (using distances) and got WA at even lower tests (4 or 5).
Can anybody help me with some hints? Should i try it in pascal with the extended type? Or anybody that got AC in C please help.
I used long arithmetics (+)
Posted by Vladimir Yakovlev (USU) 10 Aug 2004 12:07
All calculations can be done in integers. 100-digit numbers are quite enough.
Re: I used long arithmetics (+)
Posted by Lightweight! Lightweight baby! 10 Aug 2004 12:47
But don't you need sqrt (and maybe division too)? Or you did those on large numbers as well?
Re: I used long arithmetics
Posted by Vladimir Yakovlev (USU) 10 Aug 2004 14:18
I don't need division and sqrt, only addition, subtraction and multiplication.
I got it now. Thank you (-)
Posted by Lightweight! Lightweight baby! 10 Aug 2004 16:50
I've got AC without long number arithmetics - just don't use rotation (-)
Posted by Dmitry 'Diman_YES' Kovalioff 10 Aug 2004 17:09
Didn't work for me (+)
Posted by Scythe (Berinde Radu) 10 Aug 2004 21:02
I tried using double and no rotations. Actually the exact operations i did on long nombers and got AC, but on double (only add, sub and mul). It didn't work. Maybe with pascal's extended it does.
How?
Posted by Maigo Akisame (maigoakisame@yahoo.com.cn) 15 Sep 2004 20:15
AC. Just trouble.
Posted by Maigo Akisame (maigoakisame@yahoo.com.cn) 24 Sep 2004 20:31