Coronavirus
Arya is a country with $N$ cities (numbered $1$ through $N$). We may assume that the map of Arya is a tree with $N$ vertices corresponding to the cities, rooted at the city number $1$. The coronavirus has spread all over the world and unfortunately, Arya is infected too. The government is trying to defeat this virus. Their scientists made a medicine which can be used to cure parts of the countr
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