← All problemsSign in

Emergency

There are N cities in the country and some of them are connected by bidirectional roads. To handle any emergency situation, they need a emergency cell to be set up at some cities such that, in case of any emergency in a city, the fire engine, the ambulance etc., can reach that city. Setting up a emergency cell is expensive and as occurrence of a emergency situation is very rare, its just enough to

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