← All problemsSign in

The Segment Game

There are N line segments [l1,r1], [l2,r2], ... , [ln,rn] lying on a Number line, each segment is distinguishable. Sagar designed a game for his friends Akash and Shivam, he asked them to pick a line segment from the Number line turn by turn. But then he put some contraints on the way the segments will be picked, the contraints are as follows : - In the i th move a segment Sj can be picked if and

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