
131  ZOJ Monthly, March 2014  F
Ofelia is chased by her evil stepfather, and now she finds herself lost in a labyrinth. She needs your help to run away from her tragic family. There's a huge metal door standing in front of the exit of the labyrinth. There are n dots on the metal door. Pan (the god of the labyrinth) asks Ofelia to find out a triangle which has the largest height. The triangle's three vertexes must be the dots on the door, and its area must be positive. Ofelia should tell Pan the triangle's height so Pan will let Ofelia go. InputThere are multiple cases (About 100 cases). For each case, the first line contains an integer n (3<=n<=500). In the next n lines, each line contains two real number x[i], y[i] (0<=x[i], y[i]<=10000) which indicates each dot's coordinate. There is no two dots in the same coordinate. The answers are strictly greater than 0. OutputFor each test case, output one line with the maximum triangle height. Any solution with a relative or absolute error of at most 1e6 will be accepted. Sample Input6 0.000 4.000 2.000 4.000 1.000 0.000 1.000 8.000 0.900 7.000 1.100 7.000 7 6967.54555 3457.71200 3.52325 1273.85912 7755.35733 9812.97643 753.00303 2124.70937 7896.71246 8877.78054 5832.77264 5213.70478 4629.38110 8159.01498 Sample Output7.00000 8940.96643 HintIn case 1. Choose the dot 3, 5, 6 to make up a triangle, and this triangle has the largest height 7.000. In case 2. We choose dot 2, 3, 5.
Author: ZHU, Jiale 