Straight Line
CodeChefOpen on judge ↗
Kevin is learning about straight lines in a math class in his school. His teacher gave him $N$ points, each having a x coordinate and a y coordinate, and asked him if they fall on one straight line. The x coordinates of all the points are distinct. These points are sorted by their x coordinate values. While trying to solve this question, Kevin accidentally lost **x coordinates** of all the point
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