Find the minimum amount
CodeChefOpen on judge ↗
There are n islands for which X and Y coordinates are given. Chef, being a greedy ruler wants to conquer them all. The cost to conquer each island is K. However, when chef conquers island, he can connect them using bridges. When an island can be surrounded by other island and its bridges completely, conquering the island becomes easier. The cost to conquer now gets divided by a constant C. Chef wa
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