10194_FencingtheCows

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

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

Pro.ID

10194

Title

Fencing the Cows

Title链接

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

AC

5

Submit

8

Ratio

62.50%

时间&空间限制

  • Time Limit: 600/300 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    Farmer John wishes to build a fence to contain his cows, but he's a bit short on cash right. Any fence he builds must contain all of the favorite grazing spots for his cows. Given the location of these spots, determine the length of the shortest fence which encloses them.

    输入

    The first line of the input file contains one integer, N. N (0 N 10,000) is the number of grazing spots that Farmer john wishes to enclose. The next N line consists of two real numbers, Xi and Yi, corresponding to the location of the grazing spots in the plane (-1,000,000 Xi, Yi ≤ 1,000,000). The numbers will be in decimal format.

    输出

    Description

    Farmer John wishes to build a fence to contain his cows, but he's a bit short on cash right. Any fence he builds must contain all of the favorite grazing spots for his cows. Given the location of these spots, determine the length of the shortest fence which encloses them.

    Input

    The first line of the input file contains one integer, N. N (0 N 10,000) is the number of grazing spots that Farmer john wishes to enclose. The next N line consists of two real numbers, Xi and Yi, corresponding to the location of the grazing spots in the plane (-1,000,000 Xi, Yi ≤ 1,000,000). The numbers will be in decimal format.

    Output

    The output should consists of one real number, the length of fence required. The output should be accurate to two decimal places.

    Sample Input
    4
    4 8
    4 12
    5 9.3
    7 8
    Sample Output

    12.00

    Source

    样例输入

    4
    4 8
    4 12
    5 9.3
    7 8

    样例输出

    12.00

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部