Most Points on a Line
Print the maximum number of the given points that lie on a single straight line.
Input: the first line has N; the next N lines have distinct points x y.
Output: the largest collinear subset size.
Constraints:
- 1 ≤ N ≤ 3000
- |coordinates| ≤ 104
Sample Tests
Input 1
5 0 0 1 1 2 2 1 0 0 1
Output 1
3
Input 2
1 5 5
Output 2
1
Discussion (opens after you solve — no spoilers before)
No comments yet.