A Linear Solution
CodeChefOpen on judge ↗
Viral is playing marbles with his friends. While playing, he accidentally drops N marbles and the marbles are spread on the floor and stopped. Viral notes the position X,Y of the marbles as if the floor were coordinate system and marbles as points. Viral has to pick up the marbles, but Viral is lazy so he wants to decide a line connecting maximum number of marbles. Help Viral find the maximum n
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.
Sign in to chat with the tutor and save your progress.
Sign in to start