CF696F....Dary!

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Barney has finally found the one, a beautiful young lady named Lyanna. The problem is, Lyanna and Barney are trapped in Lord Loss' castle. This castle has shape of a convex polygon of nn points. Like most of castles in Demonata worlds, this castle has no ceiling.

Barney and Lyanna have an escape plan, but it requires some geometry knowledge, so they asked for your help.

Barney knows that demons are organized and move in lines. He and Lyanna want to wait for the appropriate time so they need to watch for the demons. Each of them wants to stay in a point inside the castle (possibly on edges or corners), also they may stay in the same position. They both want to pick a real number rr and watch all points in the circles with radius rr around each of them (these two circles may overlap).

We say that Barney and Lyanna are watching carefully if and only if for every edge of the polygon, at least one of them can see at least one point on the line this edge lies on, thus such point may not be on the edge but it should be on edge's line. Formally, each edge line should have at least one common point with at least one of two circles.

The greater rr is, the more energy and focus they need. So they asked you to tell them the minimum value of rr such that they can watch carefully.

输入格式

The first line of input contains a single integer nn ( 3<=n<=3003<=n<=300 ) — the number of castle polygon vertices.

The next nn lines describe the polygon vertices in counter-clockwise order. ii -th of them contains two integers xix_{i} and yiy_{i} ( xi,yi<=104|x_{i}|,|y_{i}|<=10^{4} ) — the coordinates of ii -th point of the castle. It is guaranteed that given points form a convex polygon, in particular, any three of them do not line on the same line.

输出格式

In the first line print the single number rr — minimum radius of guys' watching circles.

In the second line print the pair of coordinates of point where Barney should stay.

In the third line print the pair of coordinates of point where Lyanna should stay.

Points should lie inside the polygon.

Coordinates may not be integers. If there are multiple answers print any of them.

Your answer will be considered correct if its absolute or relative error doesn't exceed 10610^{-6} .

输入输出样例

  • 输入#1

    4
    -41 67
    -16 20
    25 25
    -36 85
    

    输出#1

    0
    -16 20
    -36 85
    
  • 输入#2

    7
    -7 54
    -5 31
    -2 17
    20 19
    32 23
    34 27
    26 57
    

    输出#2

    2.9342248
    32.019503 23.0390067
    -6.929116 54.006444
    

说明/提示

In the first example guys can stay in opposite corners of the castle.

首页