21617_For

2022-5-16 18:19| 发布者: Hocassian| 查看: 15| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505693902899-Problem List-采集的数据-后羿采集器.html

Pro.ID

21617

Title

Fort

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21617

AC

0

Submit

1

Ratio

0.00%

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    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
    3
    -1 1
    0 2
    1 1

    Sample Output

    2.000

    Source

    样例输入

    1
    3
    -1 1
    0 2
    1 1

    样例输出

    2.000

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部