I submit my solution and the OJ give the Wrong Answer,show the result is
Output : 0
Expected : 1
question is the input:[(0,0)],if only one point,how could get the maximum number of points that lie on the same straight line?
If there is only one point, of course it is in the same straight line. Two points is the same case. So if the size of the points vector is equal or smaller than 2, then you can return its size.
The problem does not ask for the maximum number of points on a line defined by the points, only the most points a single line could pass through. While there are an infinite number of lines passing through that one point, no line has more than 1 point in the list occurring in it. However, there are certainly lines which do contain that point, so the maximum number of points on a line cannot be 0.