Chef and Tourism
CodeChefOpen on judge ↗
Chef loves to travel and he wants to travel as far as he can. Recently he landed in a country called Chefland. Now there are many states in the country connected by a bi-directional bridge which connects State A to State B(There is no cycle). Chef bought a car and he is running out of time and money so he bought K litres of fuel to travel. Now chef wants to cover the longest path from
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