#P13449. [GCJ 2009 Finals] Min Perimeter
[GCJ 2009 Finals] Min Perimeter
题目描述
You will be given a set of points with integer coordinates. You are asked to compute the smallest perimeter of a triangle with distinct vertexes from this set of points.
输入格式
The first line of the input data gives you the number of cases, . test cases follow. Each test case contains on the first line the integer , the number of points in the set. lines follow, each line containing two integer numbers , . These are the coordinates of the -th point. There may not be more than one point at the same coordinates.
输出格式
For each test case, output:
Case #X: Y
where is the number of the test case and is the minimum perimeter. Answers with a relative or absolute error of at most will be considered correct. Degenerate triangles — triangles with zero area — are ok.
1
10
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
Case #1: 5.656854
提示
Limits
Small dataset(5 Pts)
- Time limit:
6015 seconds.
Large dataset(15 Pts)
- Time limit:
12030 seconds.