eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Longest Lane

Longest Lane

Mr. KM, the mayor of KM city, decided to build a new elementary school. The site for the school has an awkward polygonal shape, which caused several problems. The most serious problem was that there was not enough space for a short distance racetrack. Your task is to help Mr. KM to calculate the maximum possible length for the racetrack that can be built in the site. The track can be considered as a straight line segment whose width can be ignored. The boundary of the site has a simple polygonal shape without self-intersection, and the track can touch the boundary. Note that the boundary might not be convex. \InputFile N \textbf{3} ≤ \textbf{N} ≤ \textbf{100} \textbf{N} \textit{x}_i \textit{y}_i −1000 ≤\textit{ x}_i, \textit{y}_i ≤ 1000 The input consists of multiple test cases, followed by a line containing "\textbf{0}". Each test case has the following format. The first line contains an integer (). Each of the following lines contains two integers and (), which describe the coordinates of a vertex of the polygonal border of the site, in counterclockwise order. \OutputFile 10^\{-6\} For each test case, print its case number and the maximum possible length of the track in a line. The answer should be given as a floating point number with an absolute error of at most .
Ліміт часу 1 секунда
Ліміт використання пам'яті 64 MiB
Вхідні дані #1
4
0 0
10 0
10 10
0 10
3
0 0
1 0
0 1
0
Вихідні дані #1
Case 1: 14.142135624
Case 2: 1.41421356
Джерело ACM-ICPC Japan Alumni Group Spring Contest 2012 , Tokyo, Japan, 2012-04-15