FreeKart Map
CodeChefOpen on judge ↗
FreeKart Company is connected to n cities numbered from 1 to n. Currently the Headquarter of company is situated at index hq1. Each pair of connected cities are connected both ways. The connection is such that there is exactly one connection from the Headquarter to each city. The map of the connected cities is kept in the following way: for each city i, different from the Headquarter, there is kep
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