← All problemsSign in

Collinear Points

Given N points on the plane, represented as (xi, yi) where both xi and yi are integers, you need to tell us the maximum number of distinct points that lie on a straight line. Your algorithm needs to be really efficient. Input The first line of the input contains the number of test cases T, atmost 10. Each of the next T lines contains the description of a single test case. Each test case begins

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start