CURIOUS ATERP
CodeChefOpen on judge ↗
Department of metallurgy claims to have discovered an element which has a higher melting point than carbon. To discuss the discovery, departmental authorities plan to organise a conference and invite $m$ researchers from all over the state. There are $n$ cities in the state and $n-1$ bidirectional roads. Each researcher comes from a city $c_j$ and has a car with fuel tank capacity $f_j$ unit
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