Sandman And Three Cities
CodeChefOpen on judge ↗
Since Spiderman got correlative set of stones so he deduced that Sandman is nearby and he is planning to attack # cities $X$, $Y$ & $Z$. Spiderman wants to find the optimal route through City A to reach the other 2 cities. Help Spiderman find the optimal City A. $C(A,B)$ is defined as sum of cost to travel from the City $A$ to City $B$. Given 3 cities are represented by $X$, $Y$, $Z$ respectivel
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