Problem F
Hide the Panchams
You are the manager of a Pokemon Sanctuary, but a lot of your Panchams have been acting mischievously like usual. In order to protect the rest of your Pokemon from the antics of these Panchams, you want to build safety enclosures for the Panchams around their houses, so they can’t escape and wreak havok on your sanctuary! Since money doesn’t grow on trees, you want to minimize the length of fence that you need to buy to build the enclosures.
A Pancham enclosure is any polygon that contains at least three Pancham houses. If a Pancham house is on the edge or interior of an enclosure, it is contained within it, and it is not allowed for a Pancham house to be contained within multiple enclosures.
Input
The first line of the input contains a single integer
$3 \leq n \leq 12$, which
denotes the number of Pancham houses.
Then next $n$ lines each
contain a pair of space separated integers $x,y$ denoting the coordinates of a
Pancham house. The coordinates satisfy $0 \leq x,y \leq 10^6$. You are
guaranteed that all the Pancham houses are distinct, and that
no three Pancham houses are collinear.
Output
Output a single real number denoting the minimum length of fence that you need to buy to build the enclosures. Your answer will be considered correct if it has a relative or absolute error of at most $10^{-6}$.
Sample Input 1 | Sample Output 1 |
---|---|
3 0 0 0 1 1 0 |
3.414213 |