← All problemsSign in

Earthquake and Repairs

Mukesh has finally landed a job in the PWD (public works department) , and is really happy about it. His state has a number of villages . Each village has a hospital and is connected to a few of the other villages via roads. The roads are bi-directional , i.e. , they allow traffic in both directions. However , on the first day of his job , there was a terrible earthquake which destroyed ALL road

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