Need help in a geometry problem

Revision en1, by nhphuc, 2024-12-19 16:38:50

Today, I tried to solve a problem like this:

  • Given $$$n$$$ convex hull, convex hull $$$i$$$ have size $$$m_i$$$, begin, you started in convex hull number $$$1$$$, then, with a operation, you can do:
  1. Teleport to any points in current convex hull (with cost $$$0$$$), then use a balloon to fly to a point in another convex hull with cost is Euclid's distance between that two points.

  2. Teleport to any points in any convex hull that you have visited with cost $$$0$$$.

Find minium cost to visit all the convex hull.

Input: $$$1\leq n, m_i\leq 200$$$.

My main idea to this problem is, find all edge between two convex hulls (easy to see, cost of that edge is closest distance between that two convex hulls, let call is $$$X$$$), then build the MST, answer is sum of the all cost of edge in MST.

But, I just can find the $$$X$$$ of two convex hulls in $$$O(m^2)$$$ and can't do better, can anyone help me with this. Thank you and sorry for my bad English.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English nhphuc 2024-12-19 16:38:50 972 Initial revision (published)