25.19 25.19 problem statement confusion (C++)

#1

I have a question on P462 finding the line that has the most points passing through.

My confusion comes from the duplicated points. Are they treated as one point in a plane or two points ? I think reference test data treat them as 2 separate points and want to confirm on this. For example I think the test case from EPIJudge on GitHub
[[1, 3], [3, 12], [1, 3], [-1, -6]]
The number of points in the line is really 3 but reference data says 4.
Another case,
[[0, 0], [0, 0]]
It is only one point hence so no line can be defined. Using this data to test for line with most point pass through seems weird to me since there is no line to start with. I think I have missed something here. Would be very helpful to have the problem clarified.

Thank you

0 Likes

#2

Hi @vesper_zhao,

Yes, they are treating as different points in the problem even they fall on to the same point. Usually, your algorithm shall based on the points instead of its location, then you don’t need to worry about the values of points.

0 Likes