Skip to main content

1185. Wall Timus Online Judge

The problem states that, A greedy king wants to build a wall around his castle with minimum cost and wall should not come closer to the castle than a certain distance.

Given N Cartesian 2D points and minimum distance between castle and wall is L

To solve the problem , At first I build a convex hull using the points . 
The wall should be L distance from castle . So, we need another 4 * acos(0.0) * L length ( Summing up all round length of each point of the convex hull ) . 

Problem :: Wall 

Comments

  1. 4 * acos(0.0) * L
    can you elaborate more about this step ?
    I'm not getting how do you come up with this calculation ?

    ReplyDelete

Post a Comment