ICPC PACNW 2016 E - Enclosure
View as PDFIn the Dark Forest, the territory you control is defined by the smallest convex polygon that contains all trees you control. Your power is defined by the area of the territory you control.
You currently control  out of 
 trees in the Dark Forest. What is the highest power you can achieve by gaining control over a single additional tree somewhere in the forest?
Input
The first line of input consists of two space-separated integers  and 
 
.
Next follow  lines each with two space-separated integers 
 and 
 
 specifying the locations of the 
 trees. You control the first 
 trees given in the list; the other 
 trees do not belong to you. (Note that some of these may still be inside your territory.)
It is guaranteed that no three trees have collinear locations.
Output
Print, on a single line, the maximum power you can achieve by gaining control over a single additional tree. The output should be rounded and displayed to exactly one decimal place.
Sample Input
5 3
-5 -5
-5 5
5 -5
-4 6
5 5
Sample Output
100.0
Comments