Pro.ID22122 TitleConvex hull again Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22122 AC0 Submit0 Ratio- 时间&空间限制描述Maxwell is a naughty boy. One day, he fouled the white and clean wall with ink. Since his mother will come back home soon, Maxwell wanted to find a white convex polygon to cover these ink drops. Could you tell him the minimal area of the convex polygon which can cover all the ink drops? Now, given the coordinates of these ink drops, you will answer the minimal area of the convex polygon that can cover all the ink drops. 输入The first line of the input is a positive integer T. T is the number of the test cases followed. The first line of each test case is a positive integer N (0 < N <= 105). N is the number of the ink drops. After that, N lines are followed. The i-th line contains two integers X, and 7, (0 <= Xi, Yi < 20000) which tell you the coordinate of the i-th ink drops. There may be one or more spaces between these integers. 输出Description Maxwell is a naughty boy. One day, he fouled the white and clean wall with ink. Since his mother will come back home soon, Maxwell wanted to find a white convex polygon to cover these ink drops. Could you tell him the minimal area of the convex polygon which can cover all the ink drops? Now, given the coordinates of these ink drops, you will answer the minimal area of the convex polygon that can cover all the ink drops. Input The first line of the input is a positive integer T. T is the number of the test cases followed. The first line of each test case is a positive integer N (0 < N <= 105). N is the number of the ink drops. After that, N lines are followed. The i-th line contains two integers X, and 7, (0 <= Xi, Yi < 20000) which tell you the coordinate of the i-th ink drops. There may be one or more spaces between these integers. Output The output of the program should consist of one line of output for each test case. The output of each test case only contains the minimal area of the convex polygon. The area is a real number that has one digit after the decimal point. No redundant spaces are needed. Sample Input 2
4
0 0
1 0
0 1
1 1
2
0 0
0 1 Sample Output 1.0
0.0 Source 样例输入2
4
0 0
1 0
0 1
1 1
2
0 0
0 1 样例输出1.0
0.0 作者 |