Points And Components
CodeChefOpen on judge ↗
Ravi is playing a game in which he has made $n$ points and in each step he has to connect any two points by single line and initially no lines are connected between any points. However, there has to be a total of only $m$ lines. A component is a group of points where any two points of the group are connected using the roads. After each step , your task is to find the number of components and th
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