Page 1 of 1

11227 - The silver bullet.

Posted: Sun Jul 22, 2007 4:09 am
by coolguy
I am getting WA in this problem. I am using O( n^2 logn ) algorithm for solving this problem. I use STL set to take care of the multiple instance of a set. Can anyone give me some tricky input output ? I use EPSILON = 1e-7 to check the equality of two doubles.

Please help me in this. If any one wants i can post the source code here ...
Thank you
COOLGUY >>>>>>>>>>>>>>>>>

Posted: Sun Jul 22, 2007 4:25 am
by coolguy
i found the bug..please ignore my previous post.
thank you

Posted: Sat Sep 29, 2007 5:19 pm
by playerX
I'm getting WA too, i'm sorting and removing duplicates in linear time, them applying the naive method of finding the maximum points in a line since N is small (<= 100), I'm using an epsilon of 1e-7 too, if someone can point common flaws or some input that'd be great.

Thanks in advance
EDIT nevermind, i was using abs instead of fabs :oops:

Posted: Tue Oct 02, 2007 5:22 am
by baodog
Instead of using EPS, it's easier to just convert to integer
coordinates by multiplying by 100.