Given a grid with R (Rows) and C (Coloumns) and N points (R,C) within the grid. I need to find the count of maximum mutually equidistant collinear points.

Mutually equidistant points here
means, Every point on that line
should be at equal distance with its
neighbouring point on that line only
(1,1 > 3,3 > 5,5 > 7,7).

A line would be discarded if it
contains nonmutually equidistant
points(or point). (11 > 3,3 >5,5 >6,6 is an invalid line).
I came up with N^3 complexity approach, but it's too slow to work.
Is there any better approach?
Thank you.
asked
21 Apr '17, 09:32
2★wolfroger
48●6
accept rate:
20%