← All problemsSign in

Hello Friends

You have 'N' friends who stay at coordinates x[i],y[i]. You want to get all of them into an conference call. Calling a friend from x1, y1 to x2, y2 cost min(|x2 - x1|, |y2 - y1|). If A and B are in conference call and B calls C then A, B and C will be in conference call. What is the minimum amount of money your group will need to get all of them into one conference call. ### Input - The first

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start