Pro.ID21617 TitleFort Title链接http://10.20.2.8/oj/exercise/problem?problem_id=21617 AC0 Submit1 Ratio0.00% 时间&空间限制描述Planet Cartesian is dominated by the great kingdom Terran. There are n forts in Terran, where its people live a peaceful life. And there is also a river named Yellow River across the territory of Terran, which has raised thousands and thousands of Terran's people. To be more specific, in Cartesian coordinates, the Yellow River can be viewed as the x-axis, and each fort can regarded as a point (x, y), where x and y are both integers. However, the peaceful life has been interrupted by Protoss recently. Protoss soldiers frequently appear outside the forts, attack Terran's people, and then disappear rapidly. Many people have been hurt. So, the Federal Committee of Terran has decided to build a great wall surrounding all the forts, to protect people from Protoss's attack. Of course, to concentrate defence power, the area surrounded by the great wall should be minimized. To make things worse, as the Yellow River is quite important to Terran's people, it's necessary to make sure that part of the river (one or more segments, or points) is inside/on the great wall. Now, as the chief architect of Terran, you should make a plan to build the great wall. Come on! 输入Input may contain several test cases. The first line is a positive integer T, ( 1 ≤ T ≤ 20 ), the number of test cases below. For each test case, the first line is a positive integer n, ( 1 ≤ n ≤ 100000 ) the number of forts. And the following n lines are coordinates of forts, x and y, (x and y are both integers with absolute value no more than 10000). 输出Description Planet Cartesian is dominated by the great kingdom Terran. There are n forts in Terran, where its people live a peaceful life. And there is also a river named Yellow River across the territory of Terran, which has raised thousands and thousands of Terran's people. To be more specific, in Cartesian coordinates, the Yellow River can be viewed as the x-axis, and each fort can regarded as a point (x, y), where x and y are both integers. However, the peaceful life has been interrupted by Protoss recently. Protoss soldiers frequently appear outside the forts, attack Terran's people, and then disappear rapidly. Many people have been hurt. So, the Federal Committee of Terran has decided to build a great wall surrounding all the forts, to protect people from Protoss's attack. Of course, to concentrate defence power, the area surrounded by the great wall should be minimized. To make things worse, as the Yellow River is quite important to Terran's people, it's necessary to make sure that part of the river (one or more segments, or points) is inside/on the great wall. Now, as the chief architect of Terran, you should make a plan to build the great wall. Come on! Input Input may contain several test cases. The first line is a positive integer T, ( 1 ≤ T ≤ 20 ), the number of test cases below. For each test case, the first line is a positive integer n, ( 1 ≤ n ≤ 100000 ) the number of forts. And the following n lines are coordinates of forts, x and y, (x and y are both integers with absolute value no more than 10000). Output For each test case, output the minimum area that must be surrounded by the great wall, round to 3 digits after the decimal point. Sample Input 1 Sample Output 2.000 Source 样例输入1 样例输出2.000 作者 |