Задача A. Пара наиболее удаленных точек

Автор:Фольклор
Входной файл:input.txt   Ограничение времени:2 сек
Выходной файл:output.txt   Ограничение памяти:16 Мб

Условие

На плоскости заданы N точек. Требуется найти расстояние между наиболее удаленными из них.

Формат входного файла

Входной файла содержит число N, за которым следует N пар целых чисел x y — координаты точек.

Формат выходного файла

Выходной файл должен содержать единственное число: расстояние между наиболее удаленными точками с точностью до седьмого знака после запятой.

Ограничения

2 ≤ N ≤ 50000, 109 ≤ x, y ≤ 109.

Примеры тестов

Входной файл (input.txt) Выходной файл (output.txt)
1
2
1 1 
2 2
1.4142136

Problem B. Smooth convex hull

Author:T. Chistyakov, A. Klenin
Input file:input.txt   Time limit:3 sec
Output file:output.txt   Memory limit:64 Mb

Statement

There are N points on a plane. Convex hull is such a convex polygon with the least possible area, that all the given points are either within its interior or belong to its border.

Let's say that one convex polygon is smoother that the other one if it's sharpest angle is more obtuse than the sharpest angle of the other one.

Your task is to make the convex hull of the given set of points as smooth as possible. To do it you are allowed to exclude no more than one point from the given set.

Input file format

Input file contains integer N, then N pairs of real numbers xi yi describing given points. There are no duplicate points in the input file.

Output file format

Output file must contain a single number: the sharpest angle (in radians) in the most smooth convex hull with absolute error less than 0.01.

Constraints

3 ≤ N ≤ 1000

1 ≤ xi, yi ≤ 106

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
5
1 1  2 10  1 3  3 1  3 3 
1.57
2
4
1 1  1 3  3 1  3 3 
1.57

0.016s 0.003s 9